Skip to content

Commit

Permalink
Add flags to the code coverage config for per-folder coverage (#16)
Browse files Browse the repository at this point in the history
Update coverage configuration
  • Loading branch information
tibvdm authored Apr 4, 2024
1 parent 3fc4030 commit 3eb66d1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,25 @@ jobs:
toolchain: nightly
override: true

- name: Run cargo test
- name: Run cargo test (fa-compression)
uses: actions-rs/cargo@v1
with:
command: test
args: --all-features --no-fail-fast
args: --all-features --no-fail-fast -p fa-compression
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'

- name: Gather coverage information
- name: Gather coverage information (fa-compression)
id: coverage
uses: actions-rs/[email protected]

- name: Upload coverage reports to Codecov
- name: Upload coverage reports to Codecov (fa-compression)
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ${{ steps.coverage.outputs.report }}
flags: fa-compression
verbose: true
fail_ci_if_error: true
15 changes: 15 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
coverage:
status:
project:
default:
target: 90%
fa-compression:
target: 90%
flags:
- fa-compression

flags:
fa-compression:
paths:
- fa-compression
carryforward: true

0 comments on commit 3eb66d1

Please sign in to comment.