Skip to content

Commit

Permalink
coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
martinsachs committed Feb 2, 2024
1 parent 4064e7c commit 22b5b0f
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/grcov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Coverage

on:
push:
branches:
- master
pull_request:

jobs:
grcov:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@master
with:
toolchain: stable
override: true
- name: Build and test sources
run: |
cargo build;
cargo test;
env:
CARGO_INCREMENTAL: '0'
RUST_TEST_THREADS: '1'
RUSTC_BOOTSTRAP: '1'
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort'
- name: Collect hit files, install grcov and create coveralls report
run: |
zip -0 ccov.zip `find . \( -name "*k2*.gc*" \) -print`;
cargo install grcov;
grcov ccov.zip -s . -t coveralls --llvm --branch --ignore-not-existing --ignore "/*" --token ${{ secrets.CODECOV_TOKEN }} > coveralls.json
- uses: codecov/codecov-action@master
with:
file: ./coveralls.json
fail_ci_if_error: true

0 comments on commit 22b5b0f

Please sign in to comment.