-
Notifications
You must be signed in to change notification settings - Fork 4
41 lines (37 loc) · 1.13 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
name: Coverage
on:
# pull_request:
# branches:
# - develop
# - master
push:
# tags:
# - '*'
branches:
- duty/codecov
jobs:
coverage:
runs-on: ubuntu-latest
container:
image: sora2/substrate:env
env:
CARGO_INCREMENTAL: 0
SKIP_WASM_BUILD: 1
LLVM_PROFILE_FILE: "sora2-%p-%m.profraw"
RUST_BACKTRACE: short
RUSTFLAGS: "-Cinstrument-coverage"
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v2
- name: Run tests, with coverage
run: |
RUSTFLAGS="-Zproc-macro-backtrace" cargo test --features "kusama,polkadot,rococo,runtime-benchmarks"
grcov . --binary-path ./target/debug -s . -t lcov --branch -o coverage --ignore-not-existing --ignore "/opt/cargo/**" "target/debug" "node/src" --log-level "ERROR" --llvm-path /usr/lib/llvm-14/bin
find . -type f -name '*.profraw' -delete
- name: Upload to Codecov
uses: codecov/codecov-action@v3
with:
files: ./coverage
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false