From ad0b25262247a1e9b0a3d41fb537e47647c1fb46 Mon Sep 17 00:00:00 2001 From: TSnake41 Date: Fri, 18 Aug 2023 11:23:04 +0200 Subject: [PATCH] Use cargo-llvm-cov instead --- .github/workflows/rust.yml | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index dbcf866..bc868d3 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -22,22 +22,18 @@ jobs: - name: Build run: cargo build --verbose - - name: Code coverage - uses: actions-rs/tarpaulin@v0.1.0 - with: - version: "0.22.0" - args: '-- -p xcp-metrics-common xcp-metrics' + - name: Install cargo-llvm-cov + uses: taiki-e/install-action@cargo-llvm-cov - - name: Upload to codecov.io - uses: codecov/codecov-action@v1.0.2 - with: - token: ${{secrets.CODECOV_TOKEN}} - - - name: Archive code coverage results - uses: actions/upload-artifact@v1 + - name: Generate code coverage + run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 with: - name: code-coverage-report - path: cobertura.xml + token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos + files: lcov.info + fail_ci_if_error: true - name: Run tests run: cargo test --verbose