From 91190879d9315d2e35eb7eba830ca31523c0e8d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20M=C3=BCller?= Date: Mon, 11 Jul 2022 08:25:24 -0700 Subject: [PATCH] Switch to using cargo llvm-cov for code coverage assessment Our code coverage collection runs have repeatedly failed because of a what appears to be a bug in the actions-rs/tarpaulin implementation. This action, it turns out, has actually been (soft?) deprecated [0]. Attempting to switch to installing cargo-tarpauling directly takes ages, and we already know that we would rather avoid handling caching in GitHub Actions, because of their API mess. However, it appears as if cargo llvm-cov may be usable by now, and is generally said to provide more accurate coverage information. Thus, with this change we switch over to using it for collection of code coverage. Note that cargo-tarpaulin also seems to support using LLVM coverage as a backend, but it still suffers from the aforementioned issues. [0] https://github.com/actions-rs/tarpaulin/issues/6 --- .github/workflows/ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8e3a99f..3201f59 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,17 +30,17 @@ jobs: name: Run tests run: cargo test -- --include-ignored - if: ${{ matrix.rust == 'stable' }} - name: Run tests - uses: actions-rs/tarpaulin@v0.1 - with: - version: latest - args: -- --include-ignored - out-type: Xml + name: Install cargo-llvm-cov + uses: taiki-e/install-action@cargo-llvm-cov + - if: ${{ matrix.rust == 'stable' }} + name: Test and gather coverage + run: cargo llvm-cov --lcov --output-path lcov.info -- --include-ignored - if: ${{ matrix.rust == 'stable' }} name: Upload code coverage results uses: codecov/codecov-action@v3 with: - files: cobertura.xml + files: lcov.info + clippy: name: Lint with clippy runs-on: ubuntu-latest