Skip to content

Commit 422c03e

Browse files
committed
Add --locked to clippy and test, remove lockfile validation
1 parent 681188f commit 422c03e

1 file changed

Lines changed: 3 additions & 23 deletions

File tree

.github/workflows/rust.yml

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -50,21 +50,11 @@ jobs:
5050
target
5151
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }}
5252

53-
- name: Validate lockfile
54-
run: |
55-
cp Cargo.lock Cargo.lock.bak
56-
cargo generate-lockfile
57-
if ! diff -q Cargo.lock Cargo.lock.bak >/dev/null; then
58-
echo "::error::Cargo.lock is out of sync. Run 'cargo update' or 'rm Cargo.lock && cargo build' locally and commit the updated Cargo.lock."
59-
exit 1
60-
fi
61-
rm Cargo.lock.bak
62-
6353
- name: Check formatting
6454
run: cargo fmt --all -- --check
6555

6656
- name: Run clippy
67-
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
57+
run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
6858
env:
6959
RUSTC_WRAPPER: sccache
7060

@@ -90,18 +80,8 @@ jobs:
9080
target
9181
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }}
9282

93-
- name: Validate lockfile
94-
run: |
95-
cp Cargo.lock Cargo.lock.bak
96-
cargo generate-lockfile
97-
if ! diff -q Cargo.lock Cargo.lock.bak >/dev/null; then
98-
echo "::error::Cargo.lock is out of sync. Run 'cargo update' or 'rm Cargo.lock && cargo build' locally and commit the updated Cargo.lock."
99-
exit 1
100-
fi
101-
rm Cargo.lock.bak
102-
10383
- name: Run all workspace tests
104-
run: cargo test --workspace
84+
run: cargo test --workspace --locked
10585
env:
10686
RUSTC_WRAPPER: sccache
10787

@@ -118,4 +98,4 @@ jobs:
11898
uses: docker/setup-buildx-action@v3
11999

120100
- name: Build Docker image
121-
run: docker build -f asap-query-engine/Dockerfile -t sketchdb-queryengine-rust:latest .
101+
run: docker build -f asap-query-engine/Dockerfile -t sketchdb-queryengine-rust:latest .

0 commit comments

Comments
 (0)