-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Description
Tests run in CI but no coverage reporting, making it hard to identify untested code.
Tasks
- Add pytest-cov to test dependencies
- Configure coverage in CI workflow
- Upload coverage to Codecov or Coveralls
- Add coverage badge to README
- Set minimum coverage threshold
- Block PRs that decrease coverage
Implementation
# .github/workflows/test-dj-payfast.yml
- name: Test with pytest and coverage
run: |
pytest --cov=payfast --cov-report=xml --cov-report=html
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
fail_ci_if_error: true
flags: unittests
- name: Check coverage threshold
run: |
coverage report --fail-under=80Acceptance Criteria
- Coverage calculated in CI
- Coverage badge in README
- PRs show coverage changes
- Minimum threshold enforced
Reactions are currently unavailable