From ef8aa3e9906b699c7c02f0998b89c84b81d49fed Mon Sep 17 00:00:00 2001 From: Jaixii Date: Sun, 18 Oct 2026 05:19:04 -0400 Subject: [PATCH 1/2] ci: cancel superseded PR matrices and cache dependency downloads --- .github/workflows/ci.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c804ea3..62791fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,9 +6,15 @@ on: pull_request: branches: [main] +# Keep every non-PR run; only superseded PR validation is cancelled. +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: test: runs-on: ${{ matrix.os }} + timeout-minutes: 30 strategy: fail-fast: false matrix: @@ -21,6 +27,9 @@ jobs: - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: + cache: pip + cache-dependency-path: | + pyproject.toml python-version: ${{ matrix.python-version }} - name: Install dependencies @@ -60,6 +69,7 @@ jobs: typescript: runs-on: ${{ matrix.os }} + timeout-minutes: 30 strategy: fail-fast: false matrix: @@ -69,6 +79,9 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: + cache: npm + cache-dependency-path: | + ts/package-lock.json node-version: ${{ matrix.node-version }} - run: npm ci working-directory: ts @@ -82,6 +95,9 @@ jobs: path: ts/*.tgz - uses: actions/setup-python@v5 with: + cache: pip + cache-dependency-path: | + pyproject.toml python-version: "3.12" - run: python -m pip install -e ".[test]" - run: python -m pytest tests/test_parity.py tests/test_question_ids.py -q From c0233583f55c73a87c08cb73f405b7aecd8be24a Mon Sep 17 00:00:00 2001 From: Jaixii Date: Sun, 18 Oct 2026 05:33:40 -0400 Subject: [PATCH 2/2] ci: separate parity dependency downloads from the full Python cache --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 62791fc..ec4961e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -96,8 +96,11 @@ jobs: - uses: actions/setup-python@v5 with: cache: pip + # Parity installs a smaller Python extra than the main test matrix. + # Its TypeScript lock keeps those download caches distinct. cache-dependency-path: | pyproject.toml + ts/package-lock.json python-version: "3.12" - run: python -m pip install -e ".[test]" - run: python -m pytest tests/test_parity.py tests/test_question_ids.py -q