-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (43 loc) · 1.21 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Test
on: [push, pull_request]
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
combo: [
{ rust: stable, flags: --all-features },
{ rust: 1.70.0, flags: --all-features },
{ rust: stable, flags: --features=default },
{ rust: 1.46.0, flags: --features=default },
{ rust: stable, flags: --no-default-features },
{ rust: 1.46.0, flags: --no-default-features },
]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup toolchain
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.combo.rust }}
- name: Build
run: cargo build --all-targets ${{ matrix.combo.flags }}
- name: Test
run: cargo test ${{ matrix.combo.flags }}
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup toolchain
uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
- name: Run rustfmt
run: cargo fmt --all -- --check
- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings