-
Notifications
You must be signed in to change notification settings - Fork 1
33 lines (29 loc) · 1.1 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
name: Build and test
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
CARGO_NET_GIT_FETCH_WITH_CLI: true
jobs:
build-coverage:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v2
with:
path: 'mfio-repo'
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2023-09-01
override: true
- run: cargo install grcov
- name: Run tests with coverage
run: |
cd mfio-repo
export CARGO_INCREMENTAL=0
export RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort"
export RUSTDOCFLAGS="-Cpanic=abort"
cargo build --workspace --exclude mfio-derive --all-features
cargo test --workspace --exclude mfio-derive --all-features
grcov ./target/debug/ -s . -t lcov --llvm --branch --ignore-not-existing -o ./target/debug/coverage
bash <(curl -s https://codecov.io/bash) -f ./target/debug/coverage -t ${{ secrets.CODECOV_TOKEN }};