Skip to content

Commit 7aae1ab

Browse files
committed
workflows: set --locked everywhere, test no-default- and all-features
1 parent ce89ecf commit 7aae1ab

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

.github/workflows/rust.yml

+19-12
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ jobs:
2222
- name: Obtain Rust
2323
run: rustup override set ${{ matrix.rust }}
2424
- name: Build library
25-
run: cargo build --verbose --lib
25+
run: cargo build --locked --verbose --lib
2626
- name: Build examples
27-
run: cargo build --verbose --lib --examples
27+
run: cargo build --locked --verbose --lib --examples
2828
- name: Run unit tests
29-
run: cargo test --verbose
30-
- name: "Run README sample (TODO: update me)"
31-
run: cargo run --example sample
29+
run: cargo test --locked --verbose
30+
- name: "Run README sample"
31+
run: cargo run --locked --example sample
3232
build_bin_spec:
3333
runs-on: ubuntu-latest
3434
strategy:
@@ -45,7 +45,7 @@ jobs:
4545
- name: Obtain Rust
4646
run: rustup override set ${{ matrix.rust }}
4747
- name: Build binary
48-
run: cargo build --verbose --bin comrak --release
48+
run: cargo build --locked --verbose --bin comrak --release
4949
- name: Run spec tests
5050
run: script/cibuild
5151
build_wasm:
@@ -66,9 +66,9 @@ jobs:
6666
- name: Setup for wasm
6767
run: rustup target add wasm32-unknown-unknown
6868
- name: Build
69-
run: cargo build --verbose --target wasm32-unknown-unknown
69+
run: cargo build --locked --verbose --target wasm32-unknown-unknown
7070
- name: Build examples
71-
run: cargo build --verbose --target wasm32-unknown-unknown --examples
71+
run: cargo build --locked --verbose --target wasm32-unknown-unknown --examples
7272
no_features_build_test:
7373
runs-on: ubuntu-latest
7474
strategy:
@@ -85,17 +85,24 @@ jobs:
8585
- name: Obtain Rust
8686
run: rustup override set ${{ matrix.rust }}
8787
- name: Build and test with no features
88-
run: cargo test --no-default-features --tests
89-
lockfile:
88+
run: cargo test --locked --no-default-features
89+
all_features_build_test:
9090
runs-on: ubuntu-latest
91+
strategy:
92+
matrix:
93+
rust:
94+
- nightly
95+
- beta
96+
- stable
97+
- $MSRV
9198
steps:
9299
- uses: actions/checkout@v4
93100
with:
94101
submodules: true
95102
- name: Obtain Rust
96-
run: rustup override set $MSRV
103+
run: rustup override set ${{ matrix.rust }}
97104
- name: Build and test with no features
98-
run: cargo +stable build --locked --release --all-features
105+
run: cargo test --locked --all-features
99106
clippy_format:
100107
runs-on: ubuntu-latest
101108
steps:

0 commit comments

Comments
 (0)