-
Notifications
You must be signed in to change notification settings - Fork 41
52 lines (43 loc) · 1.24 KB
/
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
52
name: Coverage
on:
pull_request:
types: [ labeled ]
push:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
coverage:
name: Coverage
if: |
github.event_name == 'pull_request' &&
(contains(github.event.pull_request.labels.*.name, 's:review-needed') ||
contains(github.event.pull_request.labels.*.name, 's:accepted')) ||
github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Free up disk space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
- name: Install rust toolchain
run: rustup show
- uses: actions-rs/[email protected]
with:
crate: grcov
use-tool-cache: false
- name: Cache Dependencies
uses: Swatinem/rust-cache@v1
- name: Generate coverage report
run: ./scripts/tests/coverage.sh
- name: Upload to codecov.io
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ${{ runner.temp }}/zeitgeist-test-coverage.lcov
fail_ci_if_error: true
flags: tests
verbose: true
name: unit-tests