Skip to content

Commit 33c3e08

Browse files
committed
Test multiple versions of rust
1 parent d67354d commit 33c3e08

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

.github/workflows/rust.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,39 @@ on:
77
paths:
88
- 'src/**'
99
- 'Cargo.toml'
10+
- '.github/workflows/rust.yml'
1011
pull_request:
1112
branches:
1213
- master
1314
paths:
1415
- 'src/**'
1516
- 'Cargo.toml'
17+
- '.github/workflows/rust.yml'
1618

1719
env:
1820
CARGO_TERM_COLOR: always
1921

2022
jobs:
21-
build:
22-
23+
build_and_test:
2324
runs-on: ubuntu-latest
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
rust: [stable, 1.86.0, nightly, 1.77.2]
2429

2530
steps:
26-
- uses: actions/checkout@v3
31+
- name: Checkout code
32+
uses: actions/checkout@v4
33+
34+
- name: Install Rust toolchain (${{ matrix.rust }})
35+
uses: actions-rs/toolchain@v1
36+
with:
37+
profile: minimal
38+
toolchain: ${{ matrix.rust }}
39+
override: true
40+
2741
- name: Build
28-
run: cargo build --verbose --release
42+
run: cargo +${{ matrix.rust }} build --verbose --release
43+
2944
- name: Run tests
30-
run: cargo test --verbose
45+
run: cargo +${{ matrix.rust }} test --verbose

0 commit comments

Comments
 (0)