-
-
Notifications
You must be signed in to change notification settings - Fork 0
106 lines (99 loc) · 2.69 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Continuous Integration
on:
pull_request:
push:
branches:
- main
schedule:
- cron: '51 5 * * 1'
jobs:
check:
name: Check
runs-on: ubuntu-22.04
steps:
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
- name: Checkout
uses: actions/checkout@v4
- name: Check
uses: dtolnay/rust-toolchain@stable
- run: cargo check --all-targets --locked
test:
name: Test suite
runs-on: ubuntu-22.04
steps:
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
- name: Checkout
uses: actions/checkout@v4
- name: Configure Git
run: |
git config --global user.email "test@example.com"
git config --global user.name "Test"
- name: Install cargo-tarpaulin
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-tarpaulin
- name: Run tests
run: |
cargo test
- name: Get test coverage
run: |
cargo tarpaulin --engine llvm --out xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
name: code-coverage-report
file: ./cobertura.xml
fail_ci_if_error: true
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
clippy:
name: Clippy
runs-on: ubuntu-22.04
steps:
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Checkout
uses: actions/checkout@v4
- name: Check the lints
uses: dtolnay/rust-toolchain@stable
- run: cargo clippy --tests -- -D warnings
rustfmt:
name: Formatting
runs-on: ubuntu-22.04
steps:
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Checkout
uses: actions/checkout@v4
- name: Check the formatting
uses: dtolnay/rust-toolchain@stable
- run: cargo fmt --all -- --check
lychee:
name: Check links
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check the links
uses: lycheeverse/lychee-action@v1
with:
args: -v --max-concurrency 1 --exclude 'git-sumi/commit/' *.md website/docs/**/*.md
fail: true
token: ${{ secrets.GITHUB_TOKEN }}
audit:
name: Audit check
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run cargo-audit
uses: taiki-e/install-action@cargo-deny
- name: Scan for vulnerabilities
run: cargo deny check advisories