This repository uses GitHub Actions for continuous integration and testing.
The CI workflow (.github/workflows/ci.yml
) automatically:
- Runs on every push and pull request to the
main
branch - Tests across multiple Python versions: 3.9, 3.10, 3.11, and 3.12
- Executes the test suite using pytest
- Generates coverage reports and uploads to Codecov
Coverage reports are automatically uploaded to Codecov after each test run.
To enable Codecov integration, you need to:
- Sign up at codecov.io using your GitHub account
- Enable the repository in Codecov
- Add the
CODECOV_TOKEN
as a repository secret in GitHub:- Go to repository Settings → Secrets and variables → Actions
- Add a new repository secret named
CODECOV_TOKEN
- Paste the token from Codecov
Note: The workflow will continue to run even if Codecov upload fails (
fail_ci_if_error: false
), so tests will still pass while you're setting this up.
The following badges are displayed in the README files:
- CI Status: Shows whether the latest build passed or failed
- Codecov: Shows the current test coverage percentage
- Python Version: Shows which Python versions are supported
To run the tests locally before pushing:
cd merge
pip install -r requirements.txt
pytest tests/ -v --cov=merge --cov-report=term-missing
The codecov.yml
file in the repository root configures:
- Coverage precision and acceptable ranges
- Status checks for project and patch coverage
- Comment behavior on pull requests