ci: generate test coverage reports (#343)

This commit is contained in:
Rafael Cárdenas
2024-07-22 21:40:18 -06:00
committed by GitHub
parent 146bbcd584
commit 2c2e8c2e68

View File

@@ -36,10 +36,20 @@ jobs:
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Cargo test
- name: Update Rust
run: |
rustup update
RUST_BACKTRACE=1 cargo test --all -- --test-threads=1
cargo install --force cargo-tarpaulin
- name: Run Core tests
run: |
cd ${{ github.workspace }}/components/ordhook-core
cargo tarpaulin --skip-clean --out lcov -- --test-threads=1
- name: Run CLI tests
run: |
cd ${{ github.workspace }}/components/ordhook-cli
cargo tarpaulin --skip-clean --out lcov -- --test-threads=1
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1