Skip to content

Commit b6feba6

Browse files
committed
CI Fix: Using --locked in commands
1 parent 0740730 commit b6feba6

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,19 @@ jobs:
3131
components: rustfmt, clippy
3232

3333
- name: Cargo Format Check
34-
run: cargo fmt --all -- --check
34+
run: cargo --locked fmt --all -- --check
3535

3636
- name: Clippy Check
37-
run: cargo clippy --all-targets --all-features -- -D warnings
37+
run: cargo --locked clippy --all-targets --all-features -- -D warnings
3838

3939
- name: Doc Check
40-
run: RUSTDOCFLAGS="-D warnings" cargo doc --all-features --no-deps --document-private-items
40+
run: RUSTDOCFLAGS="-D warnings" cargo --locked doc --all-features --no-deps --document-private-items
4141

4242
- name: Run Tests
43-
run: cargo test --all-features
43+
run: cargo --locked test --all-features
4444

4545
- name: Build Documentation
46-
run: cargo doc --no-deps --document-private-items
46+
run: cargo --locked doc --no-deps --document-private-items
4747

4848
- name: Check MSRV Build
49-
run: cargo check --all-features
49+
run: cargo --locked check --all-features

.hooks/pre-commit

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,19 @@ git stash push -q --include-untracked --keep-index
2222
if (
2323
# Check formatting only on staged Rust files
2424
echo "Checking formatting..."
25-
cargo fmt --check
25+
cargo --locked fmt --check
2626

2727
# Run clippy
2828
echo "Running clippy..."
29-
cargo clippy --all-targets --all-features -- -D warnings
29+
cargo --locked clippy --all-targets --all-features -- -D warnings
3030

3131
# Check documentation for modified files
3232
echo "Checking documentation..."
33-
RUSTDOCFLAGS="-D warnings" cargo doc --all-features --no-deps --document-private-items
33+
RUSTDOCFLAGS="-D warnings" cargo --locked doc --all-features --no-deps --document-private-items
3434

3535
# Run tests that could be affected by the changes
3636
echo "Running tests..."
37-
cargo test --all-features
37+
cargo --locked test --all-features
3838
) ; then
3939
CHECK_STATUS=0
4040
else

0 commit comments

Comments
 (0)