Skip to content

Commit edb5004

Browse files
author
Codex
committed
CI: lock dependencies and harden cache key
1 parent 0ac842d commit edb5004

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88

99
env:
1010
CARGO_TERM_COLOR: always
11+
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
1112

1213
jobs:
1314
build:
@@ -34,21 +35,21 @@ jobs:
3435
~/.cargo/registry/cache/
3536
~/.cargo/git/db/
3637
target/
37-
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
38+
key: ${{ runner.os }}-cargo-${{ hashFiles('rust-toolchain*', '**/Cargo.lock') }}
3839
restore-keys: |
3940
${{ runner.os }}-cargo-
4041
4142
- name: Cargo fmt
4243
run: cargo fmt -- --check
4344

4445
- name: Cargo clippy
45-
run: cargo clippy -- -D warnings
46+
run: cargo clippy --locked -- -D warnings
4647

4748
- name: Cargo test
48-
run: cargo test
49+
run: cargo test --locked
4950

5051
- name: Cargo build (release)
51-
run: cargo build --release
52+
run: cargo build --release --locked
5253

5354
- name: Upload artifact
5455
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)