Slow tests annoy me. Slow tests in a repo that used to have fast tests annoy me like nothing else.
This happens to me often. I come back to a repo I worked on in the past, only to find the tests have grown slow.
But no more! The freshly released BlueRacer GitHub app monitors tests duration and posts a comment to every Pull Requests clearly stating if tests have gotten slower, like so:
At the moment, it only supports tracking durations of pytest tests running in GitHub Actions, but support for other CIs and languages is coming soon™. Sign up to the newsletter to keep notified with updates.
Installbutton on https://github.com/apps/blueracer-io.
pytest-csvas a dependency of your tests.
--csv test_durations.csv --csv-columns name,durationto your
pytestcommand in GitHub Actions.
- Add the following step after the GitHub Actions step that runs pytest:
- uses: actions/[email protected] with: name: blueracer path: test_durations.csv
- Commit & merge to the main branch, wait for tests to pass in GitHub Actions and the
test_durations.csvartifact is uploaded.
- From now on, you get a report on every Pull Request telling you if tests in the PR branch are slower than in the main branch.