-
Notifications
You must be signed in to change notification settings - Fork 3
51 lines (43 loc) · 1.28 KB
/
test-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
40
41
42
43
44
45
46
47
48
49
50
51
name: test coverage
on:
push:
branches: ["coverage-test-problem"]
jobs:
test:
name: coverage
runs-on: ubuntu-latest
env:
APP_PROFILE: test
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- name: Cache tarpaulin
uses: actions/cache@v4
id: cache-tarpaulin
with:
path: |
~/.cargo/bin/cargo-tarpaulin
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Install tarpaulin
if: ${{ steps.cache-tarpaulin.outputs.cache-hit != 'true' }}
continue-on-error: true
uses: actions-rs/cargo@v1
with:
command: install
args: >
cargo-tarpaulin
- name: Checkout repository
uses: actions/checkout@v4
- name: Generate code coverage
run: |
cargo +nightly tarpaulin --verbose --all-features --workspace --timeout 120 --engine llvm --out Xml
- name: Upload to codecov.io
uses: codecov/codecov-action@v3
with:
#token: ${{secrets.CODECOV_TOKEN}} # not required for public repos
fail_ci_if_error: true