-
Notifications
You must be signed in to change notification settings - Fork 11
82 lines (75 loc) · 2.1 KB
/
ci.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
on: [push, pull_request]
name: Continuous integration
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v2
- uses: dsherret/rust-toolchain-file@v1
- run: |
cargo check
make check-dirty-rpc-doc
cargo-shear:
name: Cargo Shear
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dsherret/rust-toolchain-file@v1
- uses: cargo-bins/cargo-binstall@main
- run: |
cargo binstall --no-confirm cargo-shear --force
cargo shear
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v2
- uses: dsherret/rust-toolchain-file@v1
- uses: taiki-e/install-action@v2
with:
tool: nextest
- run: |
RUST_BACKTRACE=full RUST_LOG=trace cargo nextest run --no-fail-fast
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v2
- uses: dsherret/rust-toolchain-file@v1
- run: cargo fmt --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v2
- uses: dsherret/rust-toolchain-file@v1
- run: |
make clippy
coverage:
name: Code Coverage
needs: [ test ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v2
- uses: dsherret/rust-toolchain-file@v1
- name: Install Grcov
run: make coverage-install-tools
- name: Generate Code Coverage Report of Unit Tests
run: |
make coverage-run-unittests
make coverage-collect-data
- name: Upload Code Coverage Report of Unit Tests
uses: codecov/codecov-action@v3
with:
files: coverage-report.info
env_vars: OS,RUST_TOOLCHAIN
fail_ci_if_error: false
flags: unittests
verbose: false
token: ${{ secrets.CODECOV_TOKEN }}