@@ -3,94 +3,70 @@ name: CI
33on :
44 push :
55 branches : [main]
6- paths-ignore :
7- - ' **.md'
8- - ' LICENSE'
96 pull_request :
107 branches : [main]
11- paths-ignore :
12- - ' **.md'
13- - ' LICENSE'
148
159env :
1610 CARGO_TERM_COLOR : always
1711 RUST_BACKTRACE : 1
18- MSRV : " 1.75"
1912
2013jobs :
21- fmt :
22- name : Formatting
23- runs-on : ubuntu-latest
24- steps :
25- - uses : actions/checkout@v4
26- - uses : dtolnay/rust-toolchain@stable
27- with :
28- components : rustfmt
29- - run : cargo fmt --check
14+ ci :
15+ runs-on : ubuntu-22.04
3016
31- clippy :
32- name : Clippy
33- runs-on : ubuntu-latest
3417 steps :
35- - uses : actions/checkout@v4
36- - uses : dtolnay/rust-toolchain@stable
37- with :
38- components : clippy
39- - uses : actions/cache@v4
18+ - uses : actions/checkout@v6
19+
20+ - name : Set up Rust
21+ uses : dtolnay/rust-toolchain@stable
4022 with :
41- path : |
42- ~/.cargo/registry
43- ~/.cargo/git
44- target
45- key : ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.toml') }}
46- - run : cargo clippy -- -D warnings
23+ components : clippy, rustfmt
4724
48- test :
49- name : Test (${{ matrix.os }})
50- runs-on : ${{ matrix.os }}
51- needs : [fmt, clippy]
52- strategy :
53- fail-fast : false
54- matrix :
55- os : [ubuntu-latest, macos-latest]
56- steps :
57- - uses : actions/checkout@v4
58- - uses : dtolnay/rust-toolchain@stable
59- - uses : actions/cache@v4
25+ - name : Cache cargo registry
26+ uses : actions/cache@v5
6027 with :
6128 path : |
6229 ~/.cargo/registry
6330 ~/.cargo/git
64- target
65- key : ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.toml') }}
66- - name : Build
67- run : cargo build --release
68- - name : Test (unit + CLI smoke tests)
31+ target/
32+ key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
33+ restore-keys : |
34+ ${{ runner.os }}-cargo-
35+
36+ - name : Check formatting
37+ run : cargo fmt --check
38+
39+ - name : Run clippy
40+ run : cargo clippy -- -D warnings
41+
42+ - name : Run tests
6943 run : cargo test
70- # LSP e2e tests are marked #[ignore] — run locally with: cargo test -- --ignored
7144
7245 msrv :
7346 name : Minimum Supported Rust Version (1.75)
74- runs-on : ubuntu-latest
47+ runs-on : ubuntu-22.04
7548 steps :
76- - uses : actions/checkout@v4
49+ - uses : actions/checkout@v6
50+
7751 - uses : dtolnay/rust-toolchain@master
7852 with :
79- toolchain : ${{ env.MSRV }}
80- - uses : actions/cache@v4
53+ toolchain : " 1.75"
54+
55+ - uses : actions/cache@v5
8156 with :
8257 path : |
8358 ~/.cargo/registry
8459 ~/.cargo/git
85- target
60+ target/
8661 key : ${{ runner.os }}-cargo-msrv-${{ hashFiles('**/Cargo.toml') }}
62+
8763 - run : cargo build
8864
8965 security-audit :
9066 name : Security Audit
91- runs-on : ubuntu-latest
67+ runs-on : ubuntu-22.04
9268 steps :
93- - uses : actions/checkout@v4
69+ - uses : actions/checkout@v6
9470 - uses : rustsec/audit-check@v2
9571 with :
9672 token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments