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: