A pytest plugin to report test results to tinybird
Low maintenance activity. Last release 19 months ago, commits in 0 of the last 26 weeks. Weaker on commit activity and recent releases.
pip install pytest-tinybirdpytest-tinybird
A pytest plugin to report test results to Tinybird. At the end of every run, this plugin posts results using the Tinybird Events API.
Requirements
- Python >=3.8
- pytest 3.8 or newer (previous versions might be compatible)
- Tinybird account and a token with append permissions
Installation
pypi install package: https://pypi.org/project/pytest-tinybird/
You can install the plugin with the following bash command:
$ pip install pytest-tinybird
Usage
You just need your Tinybird account and a Token with append permissions
Set these env variables:
export TINYBIRD_URL=<https://api.tinybird.co|https://api.us-east.tinybird.co> # depends on your region
export TINYBIRD_DATASOURCE=<datasource_name> # will be created with first results posted
export TINYBIRD_TOKEN=<token_with_append_permissions>
Then run pytest with --report-to-tinybird.
$ pytest tests --report-to-tinybird
CI execution info can also be set using some env variables. These are from GitLab:
CI_COMMIT_SHA
CI_COMMIT_BRANCH
CI_JOB_ID
CI_JOB_NAME
CI_JOB_URL
If you are not using GitLab, you will need to set them manually. For instance, for GitHub actions you can check our current GitHub actions workflow.