-
Notifications
You must be signed in to change notification settings - Fork 6
76 lines (70 loc) · 2.44 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Test
on: [push, pull_request]
permissions:
actions: write
contents: read
jobs:
msrv:
name: Minimum supported Rust version
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
- uses: dtolnay/[email protected]
id: rust-toolchain
- run: cargo check --workspace --all-targets --no-default-features
- run: cargo check --workspace --all-targets --all-features
- run: cargo test --workspace --all-features --lib --bins --examples --tests -- --skip expand
- run: cargo test --workspace --all-features --benches
- run: cargo test --workspace --doc --all-features
check:
name: Check
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
id: rust-toolchain
with:
components: clippy, rustfmt
- name: Check
run: cargo check --workspace --all-targets --all-features
- name: Test
run: cargo test --workspace --all-targets --all-features
- name: Doctest
run: cargo test --workspace --doc --all-features
- name: Clippy
run: cargo clippy --workspace --all-targets --all-features -- -Dwarnings
- name: Rustfmt
run: cargo fmt --all -- --check
miri:
name: Miri
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@miri
id: rust-toolchain
- run: cargo miri setup
- run: cargo miri test --no-default-features
- run: cargo miri test --all-features
coverage:
name: Coverage
runs-on: ubuntu-24.04-arm
env:
RUSTFLAGS: "-C instrument-coverage"
RUSTDOCFLAGS: "-C instrument-coverage"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
id: rust-toolchain
with:
components: llvm-tools-preview
- run: cargo build --workspace --all-targets --all-features
- run: cargo test --workspace --all-targets --all-features
env:
LLVM_PROFILE_FILE: "narrow-%p-%m.profraw"
- name: Install grcov
run: curl -L https://github.com/mozilla/grcov/releases/latest/download/grcov-aarch64-unknown-linux-gnu.tar.bz2 | tar jxf -
- name: grcov
run: ./grcov --branch --binary-path ./target/debug/ --source-dir . --output-type lcov --output-path lcov.info .
- uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}