Skip to content

Commit c532de8

Browse files
committed
CI: build with --locked, and add one job for stable build without --locked
1 parent 6232378 commit c532de8

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

.github/workflows/rust.yml

+12-6
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@ jobs:
2222
- uses: dtolnay/rust-toolchain@master
2323
with:
2424
toolchain: ${{ matrix.rust }}
25+
- run: RUSTFLAGS="-D warnings" cargo check --locked
26+
27+
check-notlocked:
28+
name: Check (not locked)
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v4
32+
- uses: dtolnay/rust-toolchain@stable
2533
- name: Cargo update
2634
run: cargo update
2735
- run: RUSTFLAGS="-D warnings" cargo check
@@ -40,9 +48,7 @@ jobs:
4048
- uses: dtolnay/rust-toolchain@master
4149
with:
4250
toolchain: ${{ matrix.rust }}
43-
- name: Cargo update
44-
run: cargo update
45-
- run: RUSTFLAGS="-D warnings" cargo check --all-targets --all-features
51+
- run: RUSTFLAGS="-D warnings" cargo check --locked --all-targets --all-features
4652

4753
test:
4854
name: Test Suite
@@ -51,7 +57,7 @@ jobs:
5157
steps:
5258
- uses: actions/checkout@v4
5359
- uses: dtolnay/rust-toolchain@stable
54-
- run: cargo test --all-features
60+
- run: cargo test --locked --all-features
5561

5662
test_features:
5763
name: Test suite (with features)
@@ -69,7 +75,7 @@ jobs:
6975
- uses: actions/checkout@v4
7076
- name: Install stable toolchain
7177
uses: dtolnay/rust-toolchain@stable
72-
- run: cargo test ${{ matrix.features }}
78+
- run: cargo test --locked ${{ matrix.features }}
7379

7480
fmt:
7581
name: Rustfmt
@@ -90,7 +96,7 @@ jobs:
9096
- uses: dtolnay/rust-toolchain@nightly
9197
with:
9298
components: clippy
93-
- run: cargo clippy --all-features -- -D warnings
99+
- run: cargo clippy --locked --all-features -- -D warnings
94100

95101
doc:
96102
name: Build documentation

0 commit comments

Comments
 (0)