feat(proxy): raise ProxyNotSetError from unset manager proxies #241
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' | |
| # No paths filter on pull requests, so this check can be required before | |
| # merging: a required check that never starts blocks the pull request. It | |
| # also covers pull requests that only touch files outside the push filter, | |
| # such as CHANGELOG.md, whose format tests/test_changelog_release.py checks. | |
| pull_request: | |
| branches: [ "master" ] | |
| 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 | |
| # Only a push to master updates the badge. A pull request's coverage is | |
| # not master's, and a fork's pull request gets a read-only token, so the | |
| # push would fail with 403 and turn the check red. | |
| if: github.event_name == 'push' | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| branch: coverage-badge | |
| folder: . | |
| target-folder: . | |
| clean: false |