-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (46 loc) · 1.25 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
name: 'CI'
on:
push:
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off
RUSTDOCFLAGS: -Cpanic=abort
jobs:
check:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-20.04', 'macos-latest']
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
override: true
toolchain: stable
- 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 -- --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: cargo fmt -- --check
- run: rustup component add clippy
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features -- -D warnings