This directory contains automated workflows for the verifiers project.
Purpose: Code style checking using ruff.
Triggers:
- Pull requests (opened, synchronized, reopened)
- Pushes to
mainbranch
What it does:
- Runs ruff for linting and formatting checks
- Uses configuration from
pyproject.toml
Purpose: Comprehensive testing with coverage reports.
Triggers:
- Pull requests affecting Python files, dependencies, or workflow files
- Pushes to
main,master, ordevelopbranches with the same file changes
What it does:
- Runs tests on multiple Python versions (3.11, 3.12)
- Generates coverage reports (XML, HTML, and terminal output)
- Uploads coverage to Codecov (requires
CODECOV_TOKENsecret) - Uploads HTML coverage reports as artifacts
- Comments on PRs with test results
It's recommended to set up branch protection rules for your main branch:
- Go to Settings → Branches
- Add a rule for your main branch
- Enable "Require status checks to pass before merging"
- Select the CI jobs you want to require
To run tests locally the same way they run in CI:
# Install dependencies
pip install -e .
pip install pytest pytest-asyncio pytest-cov
# Run tests
python -m pytest tests/ -v
# Run tests with coverage
python -m pytest tests/ -v --cov=verifiers --cov-report=htmlEdit the matrix.python-version in the workflow files to test on additional Python versions.
Modify the on: section in the workflow files to change when workflows run.
You can extend the workflows to include:
- Type checking with mypy
- Security scanning
- Documentation building
- Package building and publishing