Skip to content

Commit f50a3fa

Browse files
jayantkclaude
andauthored
ci(rust): pass --locked to cargo in Rust CI workflows (#4005)
Cargo silently re-resolves when a Cargo.toml changes without its lockfile being regenerated. Passing --locked makes CI fail loudly instead. The cosmwasm and fuel lockfiles were already stale (both still pinned pythnet-sdk 2.3.1 against a manifest that now declares 3.0.0), so they are regenerated here. Co-authored-by: Jayant Krishnamurthy <541339+jayantk@users.noreply.github.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent b8bac68 commit f50a3fa

15 files changed

Lines changed: 233 additions & 170 deletions

.github/workflows/ci-cosmwasm-contract.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ jobs:
2626
run: cargo fmt --all -- --check
2727
if: success() || failure()
2828
- name: Clippy check
29-
run: cargo clippy --all-targets -- --deny warnings
29+
run: cargo clippy --locked --all-targets -- --deny warnings
3030
if: success() || failure()
3131
- name: Build
32-
run: cargo build --verbose
32+
run: cargo build --locked --verbose
3333
if: success() || failure()
3434
- name: Run tests
35-
run: cargo test --verbose
35+
run: cargo test --locked --verbose
3636
if: success() || failure()

.github/workflows/ci-fortuna.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ jobs:
2121
run: cargo fmt --all -- --check
2222
if: success() || failure()
2323
- name: Clippy check
24-
run: cargo clippy -p fortuna --all-targets -- --deny warnings
24+
run: cargo clippy --locked -p fortuna --all-targets -- --deny warnings
2525
if: success() || failure()
2626
- name: Run tests
27-
run: cargo test -p fortuna -- --test-threads=1
27+
run: cargo test --locked -p fortuna -- --test-threads=1
2828
if: success() || failure()

.github/workflows/ci-fuel-contract.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ jobs:
3232
- name: Rust add wasm32-unknown-unknown target
3333
run: rustup target add wasm32-unknown-unknown
3434
- name: Build
35-
run: cargo build --verbose
35+
run: cargo build --locked --verbose
3636
- name: Run tests
37-
run: cargo test --verbose
37+
run: cargo test --locked --verbose

.github/workflows/ci-hermes-client-rust.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ jobs:
2828
run: cargo fmt --all -- --check
2929
if: success() || failure()
3030
- name: Clippy check
31-
run: cargo clippy -p pyth-hermes-client-rust --all-targets -- --deny warnings
31+
run: cargo clippy --locked -p pyth-hermes-client-rust --all-targets -- --deny warnings
3232
if: success() || failure()
3333
- name: test
34-
run: cargo test -p pyth-hermes-client-rust
34+
run: cargo test --locked -p pyth-hermes-client-rust
3535
if: success() || failure()

.github/workflows/ci-hermes-server.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ jobs:
2626
run: cargo fmt --all -- --check
2727
if: success() || failure()
2828
- name: Clippy check
29-
run: cargo clippy --all-targets -- --deny warnings
29+
run: cargo clippy --locked --all-targets -- --deny warnings
3030
if: success() || failure()
3131
- name: Run executor tests
32-
run: cargo test
32+
run: cargo test --locked
3333
if: success() || failure()

.github/workflows/ci-message-buffer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,4 @@ jobs:
6969
run: cargo fmt --all -- --check
7070
if: success() || failure()
7171
- name: Cargo clippy
72-
run: cargo clippy --all-targets -- --deny warnings
72+
run: cargo clippy --locked --all-targets -- --deny warnings

.github/workflows/ci-pyth-lazer-pusher.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ jobs:
2020
run: cargo fmt --all -- --check
2121
if: success() || failure()
2222
- name: Clippy check
23-
run: cargo clippy -p pusher-base -p websocket-delivery -p bulk-pusher -p bulk-trade-cli -p bulk-trade-mock-validator --all-targets -- --deny warnings
23+
run: cargo clippy --locked -p pusher-base -p websocket-delivery -p bulk-pusher -p bulk-trade-cli -p bulk-trade-mock-validator --all-targets -- --deny warnings
2424
if: success() || failure()
2525
- name: Run tests
26-
run: cargo test -p pusher-base -p websocket-delivery -p bulk-pusher -p bulk-trade-cli -p bulk-trade-mock-validator
26+
run: cargo test --locked -p pusher-base -p websocket-delivery -p bulk-pusher -p bulk-trade-cli -p bulk-trade-mock-validator
2727
if: success() || failure()

.github/workflows/ci-pythnet-sdk.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ jobs:
2020
run: cargo fmt --all -- --check
2121
if: success() || failure()
2222
- name: Clippy check
23-
run: cargo clippy -p pythnet-sdk --all-targets -- --deny warnings
23+
run: cargo clippy --locked -p pythnet-sdk --all-targets -- --deny warnings
2424
if: success() || failure()
2525
- name: Run executor tests
26-
run: cargo test -p pythnet-sdk
26+
run: cargo test --locked -p pythnet-sdk
2727
if: success() || failure()

.github/workflows/ci-quorum.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ jobs:
2020
run: cargo fmt --all -- --check
2121
if: success() || failure()
2222
- name: Clippy check
23-
run: cargo clippy -p quorum --all-targets -- --deny warnings
23+
run: cargo clippy --locked -p quorum --all-targets -- --deny warnings
2424
if: success() || failure()
2525
- name: Run executor tests
26-
run: cargo test -p quorum
26+
run: cargo test --locked -p quorum
2727
if: success() || failure()

.github/workflows/ci-remote-executor.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ jobs:
2727
run: cargo fmt --all -- --check
2828
if: success() || failure()
2929
- name: Clippy check
30-
run: cargo clippy --all-targets -- --deny warnings
30+
run: cargo clippy --locked --all-targets -- --deny warnings
3131
if: success() || failure()
3232
- name: Run executor tests
33+
# No --locked: cargo-test-sbf rejects it as an option and routes
34+
# anything after `--` to the test binary rather than to cargo.
3335
run: cargo test-sbf
3436
if: success() || failure()

0 commit comments

Comments
 (0)