Skip to content

Commit 8010a70

Browse files
committed
Make sure PRs fail if Cargo.lock file is out of date
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
1 parent f110930 commit 8010a70

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

.github/workflows/dep_code_checks.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ jobs:
6464
src/tests/rust_guests/witguest -> target
6565
6666
- name: Ensure up-to-date Cargo.lock
67-
run: cargo fetch --locked
67+
run: |
68+
cargo fetch --locked
69+
cargo fetch --manifest-path src/tests/rust_guests/simpleguest/Cargo.toml --locked
70+
cargo fetch --manifest-path src/tests/rust_guests/dummyguest/Cargo.toml --locked
71+
cargo fetch --manifest-path src/tests/rust_guests/witguest/Cargo.toml --locked
6872
6973
- name: fmt
7074
run: just fmt-check
@@ -128,7 +132,11 @@ jobs:
128132
src/tests/rust_guests/witguest -> target
129133
130134
- name: Ensure up-to-date Cargo.lock
131-
run: cargo fetch --locked
135+
run: |
136+
cargo fetch --locked
137+
cargo fetch --manifest-path src/tests/rust_guests/simpleguest/Cargo.toml --locked
138+
cargo fetch --manifest-path src/tests/rust_guests/dummyguest/Cargo.toml --locked
139+
cargo fetch --manifest-path src/tests/rust_guests/witguest/Cargo.toml --locked
132140
133141
- name: fmt
134142
run: just fmt-check

Justfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ test-like-ci config=default-target hypervisor="kvm":
102102
code-checks-like-ci config=default-target hypervisor="kvm":
103103
@# Ensure up-to-date Cargo.lock
104104
cargo fetch --locked
105+
cargo fetch --manifest-path src/tests/rust_guests/simpleguest/Cargo.toml --locked
106+
cargo fetch --manifest-path src/tests/rust_guests/dummyguest/Cargo.toml --locked
107+
cargo fetch --manifest-path src/tests/rust_guests/witguest/Cargo.toml --locked
105108

106109
@# fmt
107110
just fmt-check

0 commit comments

Comments
 (0)