CI: Test Workflow
Overview
The Tests GitHub Actions workflow runs the project’s test suite on every pull request targeting main. It ensures no PR merges with broken tests.
Workflow File
.github/workflows/tests.yml
Trigger
- Event:
pull_request - Branches:
main
What It Does
- Checkout — clones the repository
- Setup uv — installs the
uvpackage manager viaastral-sh/setup-uv@v4 - Install Python 3.12 —
uv python install 3.12 - Sync dependencies —
uv sync(includes dev dependencies by default) - Run tests —
uv run pytest -v
Permissions
The workflow uses least-privilege token permissions (contents: read), since it only needs to check out code and run tests.
Running Tests Locally
To reproduce the CI environment locally:
uv python install 3.12
uv sync
uv run pytest -v