Task 7: Tests on Every Push
In this task the branch workflow's placeholders become real.
Lint the code
ruff checkandruff format --check. FastAPI track:mypyas well.
Run the unit tests
pytestwith coverage; fail under a threshold. TODO: the threshold.actions/setup-pythonwith pip caching.- A matrix of Python versions. TODO: which.
Run the same checks before pushing
- TODO: what runs outside the GitHub-hosted runners: pre-commit on the student's machine? a self-hosted runner?
Break a test, and read the run
- Push a failing test; read the failure in the log and in the pull request's checks.