Skip to content

Commit 220a7a8

Browse files
authored
ci: cancel superseded PR runs; skip build on docs-only PRs (#440)
Two workflow tweaks aimed at the partial-miss tier (~10-13min) build that dominates everyday PR iteration: 1. Concurrency cancellation - in-progress runs on the same PR branch are cancelled when a new push arrives. main pushes are not cancelled (cancel-in-progress is gated on github.event_name == 'pull_request') so each merged commit still gets its own verification pass. 2. paths-ignore on the Build and Test trigger - PRs that touch only markdown files or Docs/ skip the full build/test cycle entirely. PR Validation (villint) keeps its current trigger so doc PRs still pass through linting. If 'Build and Test VillageSQL' is configured as a required status check on main, doc-only PRs may report it as missing rather than passing - will need a no-op fallback job in that case.
1 parent a196132 commit 220a7a8

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,20 @@ name: Build and Test
33
on:
44
push:
55
branches: [ main ]
6+
paths-ignore:
7+
- '**.md'
8+
- 'Docs/**'
69
pull_request:
710
branches: [ main ]
11+
paths-ignore:
12+
- '**.md'
13+
- 'Docs/**'
14+
15+
# Cancel superseded runs on the same PR branch. main pushes are not cancelled
16+
# so each merged commit gets its own pass.
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
19+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
820

921
jobs:
1022
build-and-test:

.github/workflows/validate-pr.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
- reopened
1010
- synchronize
1111

12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
14+
cancel-in-progress: true
15+
1216
jobs:
1317
validate:
1418
name: Validate PR

0 commit comments

Comments
 (0)