-
Notifications
You must be signed in to change notification settings - Fork 15
39 lines (33 loc) · 1.3 KB
/
coverage.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
name: Test Coverage
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
push:
paths:
- '**.rs'
- '**.snap'
- '**.yml'
jobs:
test:
name: Generate Coverage Report
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- name: Install cargo-hack
uses: taiki-e/install-action@a3df29458daa5c62abace1e6b358018bed57d5b4 # v2
with:
tool: cargo-tarpaulin
# We run the coverage report on the workspace, but we configured in codecov to only look at parts of the workspace essentially
#
# This is because we have a workspace with multiple crates, and we want to generate coverage for all of them, but we only want to
# report the coverage of rustic_backend and rustic_core crates (currently) as this is where the main logic is
- name: Generate code coverage
run: |
cargo tarpaulin --verbose --all-features --workspace --timeout 120 --out xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: rustic-rs/rustic_core