-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4064e7c
commit 22b5b0f
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |