This project uses GitHub Actions for CI with two main workflows:
Runs automated tests and code coverage checks when:
- Code is pushed to
main
branch - Changes are made to core directories (fuel_tracker, tests, config, etc.)
- Manually triggered
Key steps:
- Builds Docker stack
- Validates database migrations
- Runs pytest suite
- Generates coverage reports
- Uploads coverage artifacts
- Updates coverage badge
Runs code quality checks when:
- Code is pushed to
main
branch - Manually triggered
Key steps:
- Sets up Python environment
- Runs pre-commit hooks for linting and formatting
You can manually trigger workflows using GitHub CLI:
# Trigger tests workflow
gh workflow run tests.yml
# Trigger pre-commit workflow
gh workflow run pre-commit.yml
Download and view the latest coverage report:
# Download coverage artifact
gh run download -D cov-arts --name coverage-report
# View coverage report in browser
python -m http.server -d cov-arts
Then open http://localhost:8000
in your browser to view the coverage report.
Note: Coverage artifacts are retained for 7 days.
The tests workflow automatically generates and updates a coverage badge
(coverage.svg
) in the repository root. This badge is updated on every
successful test run and provides a quick visual indicator of the project's
test coverage percentage.