Skip to content

Commit ccfcd0d

Browse files
committed
ci: fix duplicate runs and combine fmt/clippy/test
- Remove claude/** from push triggers (PRs handle this) - Add concurrency to cancel in-progress runs - Combine check, fmt, clippy, test into single CI job Reduces number of checks from 7 to 4 and eliminates duplicates.
1 parent cf0f20e commit ccfcd0d

1 file changed

Lines changed: 12 additions & 35 deletions

File tree

.github/workflows/ci.yml

Lines changed: 12 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@ name: CI
22

33
on:
44
push:
5-
branches: [main, "claude/**"]
6-
pull_request:
75
branches: [main]
6+
pull_request:
7+
8+
# Cancel in-progress runs for same PR/branch
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
812

913
permissions:
1014
contents: read
@@ -14,47 +18,20 @@ env:
1418
RUST_BACKTRACE: 1
1519

1620
jobs:
17-
check:
18-
name: Check
19-
runs-on: ubuntu-latest
20-
steps:
21-
- uses: actions/checkout@v4
22-
- uses: dtolnay/rust-toolchain@stable
23-
- uses: Swatinem/rust-cache@v2
24-
- name: Check
25-
run: cargo check --workspace --all-targets
26-
27-
fmt:
28-
name: Rustfmt
21+
ci:
22+
name: CI
2923
runs-on: ubuntu-latest
3024
steps:
3125
- uses: actions/checkout@v4
3226
- uses: dtolnay/rust-toolchain@stable
3327
with:
34-
components: rustfmt
35-
- name: Check formatting
36-
run: cargo fmt --all -- --check
37-
38-
clippy:
39-
name: Clippy
40-
runs-on: ubuntu-latest
41-
steps:
42-
- uses: actions/checkout@v4
43-
- uses: dtolnay/rust-toolchain@stable
44-
with:
45-
components: clippy
28+
components: rustfmt, clippy
4629
- uses: Swatinem/rust-cache@v2
30+
- name: Format
31+
run: cargo fmt --all -- --check
4732
- name: Clippy
4833
run: cargo clippy --workspace --all-targets -- -D warnings
49-
50-
test:
51-
name: Test
52-
runs-on: ubuntu-latest
53-
steps:
54-
- uses: actions/checkout@v4
55-
- uses: dtolnay/rust-toolchain@stable
56-
- uses: Swatinem/rust-cache@v2
57-
- name: Run tests
34+
- name: Test
5835
run: cargo test --workspace
5936

6037
build:

0 commit comments

Comments
 (0)