This repo includes Tinybird resources - a datasource file and nine (9) pipe files - to calculate some typical CI pipeline metrics based on data created by the pytest-tinybird plugin. You can use these as examples in your CI analytics development.
These files are meant to be used in conjunction with the pytest-tinybird
plugin. For more information, please read [this](link to blog post)
Follow these steps to make use of these files:
- Install the pytest-tinybird plugin in your pytest environment using the Python package installer pip.
- Create a free Tinybird account and set up a Workspace.
- Clone this repo and use the Tinybird CLI to push the files to your Workspace.
- Set three environment variables in your pytest environment:
TINYBIRD_URL
: For examplehttps://api.tinybird.co
orhttps://api.us-east.tinybird.co
depending on your Workspace region.TINYBIRD_DATASOURCE
: The name of your Data Source in Tinybird, e.g.test_reports
in this repo.TINYBIRD_TOKEN
: A Tinybird Auth Token with DATASOURCE:WRITE permissions.
- Run your instance of pytest with the
--report-to-tinybird
option. - Use your Tinybird APIs as you'd like!