Skip to content

Commit 1aa1413

Browse files
committed
run tests in CI
1 parent 187a5cc commit 1aa1413

File tree

1 file changed

+26
-13
lines changed

1 file changed

+26
-13
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,38 @@ on:
88
- trying
99

1010
jobs:
11-
msrv:
12-
name: Rust MSRV
11+
12+
check:
13+
name: check
1314
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
build: [msrv, stable]
18+
features: ["", "--no-default-features", "--no-default-features --features use_alloc", "--all-targets --all-features"]
19+
include:
20+
- build: msrv
21+
rust: 1.62.1
22+
- build: stable
23+
rust: stable
24+
exclude:
25+
- build: msrv
26+
# we only care about the MSRV with respect to the lib target
27+
features: "--all-targets --all-features"
1428
steps:
15-
- uses: actions/checkout@v2
16-
- uses: dtolnay/rust-toolchain@1.36.0
17-
- run: cargo check --no-default-features
18-
- run: cargo check --no-default-features --features "use_alloc"
19-
- run: cargo check
29+
- uses: actions/checkout@v3
30+
- uses: dtolnay/rust-toolchain@master
31+
with:
32+
toolchain: ${{ matrix.rust }}
33+
- run: cargo check ${{ matrix.features }}
2034

21-
stable:
22-
name: Rust Stable
35+
test:
36+
name: test
2337
runs-on: ubuntu-latest
2438
steps:
25-
- uses: actions/checkout@v2
39+
- uses: actions/checkout@v3
2640
- uses: dtolnay/rust-toolchain@stable
27-
- run: cargo check --no-default-features
28-
- run: cargo check --no-default-features --features "use_alloc"
29-
- run: cargo test
41+
- run: cargo test --all-features
42+
3043

3144
# https://github.com/rust-lang/crater/blob/9ab6f9697c901c4a44025cf0a39b73ad5b37d198/.github/workflows/bors.yml#L125-L149
3245
end-success:

0 commit comments

Comments
 (0)