-
Notifications
You must be signed in to change notification settings - Fork 0
97 lines (82 loc) · 2.41 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Test
on:
pull_request:
branches:
- '*'
push:
branches:
- '*'
jobs:
test:
name: test
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
matrix:
include:
- build: pinned
os: ubuntu-22.04
rust: 1.66.1
features: ''
- build: stable
os: ubuntu-22.04
rust: stable
features: ''
- build: nightly
os: ubuntu-22.04
rust: nightly
features: 'unstable'
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
components: 'clippy, rustfmt'
- name: Formatting
run: cargo fmt --all --check
- name: Clippy
run: cargo clippy --features '${{ matrix.features }}' -- -D warnings
- name: Build
run: cargo build --verbose --features '${{ matrix.features }}'
- name: Build fuzzer
run: cargo build
working-directory: fuzz
- name: Build examples
run: cargo build --examples --features '${{ matrix.features }}'
- name: Test
run: cargo test --features '${{ matrix.features }}'
# The no_panic testing requires a release build
- name: Test nopanic
run: cargo test --release --features _nopanic test_no_panic
- name: Docs
run: cargo doc
- name: Install cargo-tarpaulin
uses: taiki-e/install-action@v2
with:
tool: [email protected]
- name: cargo-tarpaulin
run: |
cargo tarpaulin \
--out html \
--output-dir target/tarpaulin \
--engine llvm \
--features '${{ matrix.features }}' \
--fail-under 100
- name: Upload coverage
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: tarpaulin-report-${{ matrix.build }}
path: target/tarpaulin/tarpaulin-report.html
- name: Install Miri
if: ${{ matrix.rust == 'nightly' }}
run: |
rustup component add miri
cargo miri setup --features '${{ matrix.features }}'
- name: Test with Miri
if: ${{ matrix.rust == 'nightly' }}
run: cargo miri test
env:
MIRIFLAGS: '-Zmiri-symbolic-alignment-check'