Skip to content

Commit

Permalink
ci: Replace code coverage
Browse files Browse the repository at this point in the history
Measure test coverage using `cargo-llvm-cov`.

Signed-off-by: Manabu Sugimoto <Manabu.Sugimoto@sony.com>
  • Loading branch information
ManaSugi committed May 26, 2023
1 parent d9f809a commit 5dcd06c
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,21 +181,22 @@ jobs:
- name: Verify that the libseccomp crate version is up to date in README
run: grep -q "$(sed -n 's/^version = \(.*\)/libseccomp = \1/p' libseccomp/Cargo.toml)" README.md

# coverage:
# name: Code Coverage
# runs-on: ubuntu-latest
# strategy:
# matrix:
# features:
# - all-features
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# - name: Install upstream libseccomp
# run: sudo ./scripts/install_libseccomp.sh
# - name: Run cargo tarpaulin
# uses: actions-rs/tarpaulin@v0.1
# with:
# args: '--${{ matrix.features }} -- --test-threads 1'
# - name: Upload to codecov.io
# uses: codecov/codecov-action@v3
coverage:
name: Code Coverage
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Install upstream libseccomp
run: sudo ./scripts/install_libseccomp.sh
- name: Generate code coverage
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info -- --test-threads 1
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: lcov.info
fail_ci_if_error: true

0 comments on commit 5dcd06c

Please sign in to comment.