Skip to content

Commit a96445b

Browse files
authored
Add missing --locked to Cargo commands (#391)
The Cargo `--locked` argument ensures that Cargo will fail with an error if `Cargo.lock` is out of sync with `Cargo.toml`, rather than the lockfile being silently updated. As such, in CI we should always be using `--locked` for projects that have committed their lockfile to Git (which should be the case for most projects other than those that are libraries). After seeing that `cnb-otel-collector` didn't use `--locked` in all cases, I audited all of our Rust repos and found others missing `--locked` too. GUS-W-18062544.
1 parent b500241 commit a96445b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
run: "./mvnw --batch-mode package"
4646
- name: Run integration tests
4747
working-directory: "integration-test"
48-
run: "cargo test"
48+
run: "cargo test --locked"
4949

5050
maven:
5151
name: "Unit Tests (Java ${{ matrix.java-version }})"

0 commit comments

Comments
 (0)