-
-
Notifications
You must be signed in to change notification settings - Fork 215
39 lines (34 loc) · 961 Bytes
/
coverage.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
name: Code Coverage
on:
push:
branches:
- main
paths:
- '**.rs' # only execute on changes to go files
- '**/Cargo.toml' # or dependency updates
- '.github/workflows/**' # or workflow changes
jobs:
cover:
strategy:
fail-fast: false
matrix:
version:
- stable
name: Coverage ${{ matrix.version }} - x86_64-unknown-linux-gnu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.version }}
components: rustfmt, clippy
- name: Generate coverage file
run: |
cargo install cargo-tarpaulin
cargo tarpaulin --all-features --out xml
- name: Upload to codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
file: cobertura.xml