Skip to content

[MAINT]: Bump the minor-and-patch group with 6 updates #32

[MAINT]: Bump the minor-and-patch group with 6 updates

[MAINT]: Bump the minor-and-patch group with 6 updates #32

Workflow file for this run

name: Coverage
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: coverage-${{ github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
coverage:
name: Coverage
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.12"
- name: Set up uv
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
with:
enable-cache: true
- name: Install dependencies
run: uv sync --frozen
- name: Run tests with coverage
id: tests
# Use 'coverage run' instead of 'pytest --cov' so that coverage
# starts BEFORE pytest loads plugins. rampart registers a pytest
# plugin via the pytest11 entry point — if coverage starts after
# plugin loading, all module-level code imported during plugin
# setup is invisible to the tracer.
run: uv run coverage run -m pytest tests/unit -q
- name: Coverage summary
if: ${{ steps.tests.outcome == 'success' }}
run: |
echo '## Coverage Report' >> $GITHUB_STEP_SUMMARY
uv run coverage report --format=markdown --fail-under=0 >> $GITHUB_STEP_SUMMARY
- name: Check coverage threshold
if: ${{ steps.tests.outcome == 'success' }}
# Threshold is defined in pyproject.toml [tool.coverage.report] fail_under
run: uv run coverage report