From 792c9380cd4bd90e6f1ed5ba6dca654427eb7ed8 Mon Sep 17 00:00:00 2001 From: gold-silver-copper <157451540+gold-silver-copper@users.noreply.github.com> Date: Wed, 18 Nov 2026 10:00:28 -0800 Subject: [PATCH] ci: never cancel a push run on main, and skip draft PRs --- .github/workflows/ci.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1480532..0980f6b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,11 +4,13 @@ on: push: branches: [main] pull_request: + types: [opened, synchronize, reopened, ready_for_review] branches: [main] +# A PR cancels its own stale run; every push to main runs to the end. concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} env: CARGO_TERM_COLOR: always @@ -16,6 +18,7 @@ env: jobs: test: name: Test (${{ matrix.os }}) + if: github.event.pull_request.draft != true runs-on: ${{ matrix.os }} timeout-minutes: 30 strategy: @@ -39,6 +42,7 @@ jobs: clippy: name: Clippy + if: github.event.pull_request.draft != true runs-on: ubuntu-latest timeout-minutes: 15 steps: @@ -60,6 +64,7 @@ jobs: fmt: name: Format + if: github.event.pull_request.draft != true runs-on: ubuntu-latest timeout-minutes: 10 steps: