feat(routes): let add_routes leave response bodies out of /cached-records #140
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Coverage Badge | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| paths: | |
| - '**.py' | |
| - 'pyproject.toml' | |
| - '.github/workflows/coverage.yml' | |
| pull_request: | |
| branches: [ "master" ] | |
| paths: | |
| - '**.py' | |
| - 'pyproject.toml' | |
| - '.github/workflows/coverage.yml' | |
| permissions: | |
| contents: write | |
| jobs: | |
| coverage: | |
| runs-on: ubuntu-latest | |
| services: | |
| memcached: | |
| image: memcached:1.6-alpine | |
| ports: | |
| - 11211:11211 | |
| redis: | |
| image: redis:alpine | |
| ports: | |
| - 6379:6379 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Set up Python | |
| uses: actions/setup-python@v7 | |
| with: | |
| python-version: "3.14" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v10.2.0 | |
| - name: Sync dependencies | |
| run: uv sync | |
| - name: Generate coverage report | |
| run: | | |
| uv run coverage run -m pytest | |
| uv run coverage report | |
| uv run coverage xml | |
| uv tool run --from genbadge[coverage] genbadge coverage -i coverage.xml -o coverage.svg | |
| env: | |
| # The suites that talk to a real server are opt-in: they wipe what they | |
| # connect to, so they skip unless a port is named. These are the service | |
| # containers above, which exist only for this job. | |
| CACHEX_TEST_REDIS_PORT: 6379 | |
| CACHEX_TEST_MEMCACHED_PORT: 11211 | |
| # ...and here the services are this workflow's own responsibility, so a | |
| # skipped suite is a broken job, not a safe default. Without this a | |
| # wrong port silently drops those tests and the run is still green: | |
| # coverage stays near 97%, well over the 90% gate. | |
| CACHEX_REQUIRE_LIVE_SERVERS: 1 | |
| - name: Upload coverage badge | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| branch: coverage-badge | |
| folder: . | |
| target-folder: . | |
| clean: false |