Add Scenario run history #5158
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
| # Single place for all coverage checks: overall threshold + diff coverage on PRs. | |
| # Runs once on Ubuntu/Python 3.12 instead of across the full OS x Python matrix. | |
| # | |
| # Release branches run on push only, for the overall coverage threshold. The diff-coverage | |
| # step is deliberately limited to pull requests targeting main, because it compares against | |
| # origin/main and a release branch differs from main by the entire release delta. | |
| name: coverage | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| - "releases/v*" | |
| pull_request: | |
| branches: | |
| - "main" | |
| merge_group: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| coverage: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | |
| with: | |
| python-version: "3.12" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 | |
| with: | |
| version: "0.9.17" | |
| enable-cache: true | |
| cache-dependency-glob: | | |
| **/pyproject.toml | |
| **/uv.lock | |
| - name: Install dev extras | |
| run: uv sync --extra all | |
| - name: Run unit tests with coverage (fail under 78%) | |
| run: make unit-test-cov-xml | |
| - name: Code Coverage Report | |
| uses: irongut/CodeCoverageSummary@51cc3a756ddcd398d447c044c02cb6aa83fdae95 # v1.3.0 | |
| if: always() | |
| with: | |
| filename: coverage.xml | |
| badge: true | |
| fail_below_min: false | |
| format: markdown | |
| hide_branch_rate: false | |
| hide_complexity: true | |
| indicators: true | |
| output: both | |
| thresholds: '60 80' | |
| - name: Check diff coverage on PR (>=90% on changed lines) | |
| if: github.event_name == 'pull_request' | |
| run: | | |
| git fetch origin main | |
| make unit-test-diff-cover |