-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (48 loc) · 1.38 KB
/
ci.yaml
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
name: 'CI'
on:
push:
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
permissions:
checks: write
pull-requests: write
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: -Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort
RUSTDOCFLAGS: -Cpanic=abort
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
override: true
toolchain: nightly
components: clippy
- name: Cache dependencies
uses: Swatinem/rust-cache@v1
- name: Build
run: cargo build --locked --verbose
- name: Test
run: |
cargo install cargo2junit grcov rust-covfix;
cargo test $CARGO_OPTIONS -- -Z unstable-options --format json | cargo2junit > results.xml;
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: |
results.xml
- name: Check format
run: |
rustup component add rustfmt --toolchain nightly-x86_64-unknown-linux-gnu
cargo fmt -- --check
- run: rustup component add clippy
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features -- -D warnings