-
Notifications
You must be signed in to change notification settings - Fork 84
56 lines (52 loc) · 1.98 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
on:
# push:
# branches: [main, 'release-v**']
pull_request:
name: Code coverage
concurrency:
group: 'tests-${{ 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-8-cores
# container:
# image: xd009642/tarpaulin:develop-nightly
# options: --security-opt seccomp=unconfined
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: Runing cargo release
run: ./ci/run-check.sh
env:
TARGET: cargo-build
RUSTC_WRAPPER: "sccache"
- name: generate codecov reports
run: |
echo "---- GENERATE CODE COVERAGE ----"
echo "# Install tarpaulin and build dependencies"
# apt-get install pkg-config libssl-dev llvm libclang-dev build-essential protobuf-compiler
# curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh && source "$HOME/.cargo/env"
echo "# Install Tarpaulin"
cargo install --locked cargo-tarpaulin
# make Cargo.toml
echo "Generate code coverage for ${{ matrix.target }}"
RUST_BACKTRACE=1 cargo +nightly tarpaulin --all-features --verbose --no-fail-fast --workspace --timeout 300 --out xml
# UPLOAD REPORTS (requires cargo 1.70.0)
- name: Upload codecov report
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
# files: ./coverage1.xml,./coverage2.xml # optional
# flags: unittests # optional
# name: codecov-umbrella # optional
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)