-
Notifications
You must be signed in to change notification settings - Fork 81
61 lines (57 loc) · 2 KB
/
codecov.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
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
pull_request_review:
types: [submitted]
workflow_dispatch:
name: Code coverage
concurrency:
group: 'codecov-${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
permissions:
id-token: write
contents: read
jobs:
codecov:
runs-on: ubuntu-latest-4-cores
if: >
github.event.pull_request.draft == false ||
github.ref == 'refs/heads/main' ||
(github.event_name == 'pull_request_review' && github.event.review.state == 'approved') ||
github.event.action == 'ready_for_review' ||
github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@master
- name: Prep build
uses: ./.github/actions/prep-ubuntu
with:
cache: enabled
# Cache needs Google credentials:
GWIP: ${{ secrets.GWIP_SCCACHE }}
GSA: ${{ secrets.GSA_SCCACHE }}
- name: Install Tarpaulin
run: cargo install --locked cargo-tarpaulin
- name: generate codecov reports
env:
RUST_BACKTRACE: 1
run: |
cargo tarpaulin --timeout 300 -e runtime-integration-tests --features fast-runtime \
--exclude-files runtime/*/src/migrations.rs \
--exclude-files runtime/common/src/migrations \
--exclude-files pallets/rewards/src/migrations/new_instance.rs \
--exclude-files pallets/block-rewards/src/migrations.rs \
--exclude-files **/mock.rs \
--exclude-files **/weights.rs \
--exclude-files **/weights/* \
--exclude-files node/ \
--exclude-files runtime \
--workspace --out xml
# UPLOAD REPORTS (requires cargo 1.70.0)
- name: Upload to codecov.io
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
verbose: true # optional (default = false)