Skip to content

Commit

Permalink
Merge pull request #88 from gendx/codecov-flags
Browse files Browse the repository at this point in the history
Split Codecov report into unit and integration tests.
  • Loading branch information
gendx authored Oct 31, 2022
2 parents adfba36 + 035097f commit 17bb25f
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,35 @@
on: [push, pull_request]
name: Code coverage
jobs:
coverage:
unit_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@nightly
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate code coverage
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
run: cargo llvm-cov --all-features --workspace --lib --lcov --output-path lcov.info
- name: Upload to Codecov
uses: codecov/codecov-action@v3.1.0
with:
files: lcov.info
flags: unit
verbose: true
fail_ci_if_error: true
integration_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@nightly
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate code coverage
run: cargo llvm-cov --all-features --workspace --test '*' --lcov --output-path lcov.info
- name: Upload to Codecov
uses: codecov/codecov-action@v3.1.0
with:
files: lcov.info
flags: integration
verbose: true
fail_ci_if_error: true

0 comments on commit 17bb25f

Please sign in to comment.