-
Notifications
You must be signed in to change notification settings - Fork 6
74 lines (70 loc) · 1.83 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
on:
push:
branches: []
pull_request:
branches:
- main
name: Continuous integration
jobs:
test:
name: Test Suite
runs-on: ubuntu-latest
strategy:
matrix:
rust: [beta, stable, 1.70.0]
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.rust }}
# Skip cargo update for MSRV validation build
- run: cargo update
if: ${{ matrix.rust == 'stable' || matrix.rust == 'beta' }}
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: cargo test
lints:
name: Lints
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.rust }}
component: clippy, rustfmt
- run: cargo fmt --all -- --check
- run: cargo clippy -- -D warnings
- run: cargo check --no-default-features
- run: cargo check --all-features
coverage:
name: Coverage
runs-on: ubuntu-latest
container:
image: xd009642/tarpaulin:develop
options: --security-opt seccomp=unconfined
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Generate code coverage
run: |
cargo tarpaulin --verbose --timeout 120 --out xml
- name: Upload to codecov.io
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}