From 4aef9720f7c893ec9da16a90bc9e1340e72abe68 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 12 Jul 2026 12:57:21 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=AA=20TEST:=20Fix=20dead=20codecov=20u?= =?UTF-8?q?pload,=20modernize=20CI=20actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Codecov upload step's condition still required matrix.python-version == '3.9', which left the test matrix in #250, so coverage has been silently dead (never uploaded) since then. Re-key the condition to the py3.13 / Sphinx ~=8.0 / ubuntu-latest cell, and allow it to fire on pushes to main as well as same-repo PRs. Also: - Bump codecov/codecov-action v3 -> v5 (deprecated), renaming the `file:` input to `files:` per the v4+ API. - Add a top-level concurrency group keyed on workflow + ref with cancel-in-progress, so superseded pushes stop wasting runners. - Bump actions/checkout v4 -> v5 and actions/setup-python v5 -> v6 in all jobs. --- .github/workflows/ci.yml | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 943e34d..45b96e3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,10 @@ on: - 'v*' pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: pre-commit: @@ -14,9 +18,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: "3.11" - uses: pre-commit/action@v3.0.1 @@ -49,9 +53,9 @@ jobs: name: Tests (py${{ matrix.python-version }}, Sphinx${{ matrix.sphinx-version }}, on ${{ matrix.os }}) steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} cache: pip @@ -63,13 +67,13 @@ jobs: run: | pytest --cov=sphinx_design --cov-report=xml --cov-report=term-missing - name: Upload to Codecov - if: github.event.pull_request.head.repo.full_name == github.repository && matrix.python-version == '3.9' && matrix.os == 'ubuntu-latest' - uses: codecov/codecov-action@v3 + if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && matrix.python-version == '3.13' && matrix.sphinx-version == '~=8.0' && matrix.os == 'ubuntu-latest' + uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} name: pytests flags: pytests - file: ./coverage.xml + files: ./coverage.xml fail_ci_if_error: true docs-build-format: @@ -80,9 +84,9 @@ jobs: format: [html, latex, man] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: "3.11" cache: pip @@ -119,9 +123,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout source - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: "3.11" - name: install flit