Skip to content

Commit f54ad78

Browse files
committed
ci,test: Add strategy.matrix.toolchain
Run test job on rust stable and 1.85.0 (MSRV). test and lint jobs now use `actions-rust-lang/setup-rust-toolchain`.
1 parent 4f6878e commit f54ad78

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

.github/workflows/rust.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,21 @@ env:
99

1010
jobs:
1111
test:
12+
name: Test
1213
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
toolchain:
17+
- 1.85.0 # MSRV
18+
- stable
1319
steps:
14-
- uses: actions/checkout@v6
20+
- name: Checkout
21+
uses: actions/checkout@v6
22+
- name: Install Rust
23+
uses: actions-rust-lang/setup-rust-toolchain@v1
24+
with:
25+
toolchain: ${{ matrix.toolchain }}
26+
cache: true
1527
- name: Check features
1628
run: |
1729
cargo check --no-default-features
@@ -22,9 +34,16 @@ jobs:
2234
run: cargo test --no-fail-fast
2335

2436
lint:
37+
name: Lint
2538
runs-on: ubuntu-latest
2639
steps:
27-
- uses: actions/checkout@v6
40+
- name: Checkout
41+
uses: actions/checkout@v6
42+
- name: Install Rust
43+
uses: actions-rust-lang/setup-rust-toolchain@v1
44+
with:
45+
toolchain: stable
46+
cache: true
2847
- name: Rustfmt
2948
run: cargo fmt --all --check
3049
- name: Lint

0 commit comments

Comments
 (0)