From d73a9a4f04568c8c609ba1d371419be529efcd74 Mon Sep 17 00:00:00 2001 From: Tom Fay Date: Thu, 28 Nov 2024 06:27:02 +0000 Subject: [PATCH] add coverage report (#24) --- .github/workflows/ci.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 64be4e9..5ece80d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,3 +86,27 @@ jobs: uses: Swatinem/rust-cache@v2 - name: Run cargo test --features fips run: cargo test --tests --features fips -- --test-threads=1 + + coverage: + name: Coverage + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v4 + - name: Install toolchain + uses: dtolnay/rust-toolchain@v1 + with: + toolchain: stable + components: llvm-tools + - name: Cache build artifacts + uses: Swatinem/rust-cache@v2 + - name: Install cargo-llvm-cov + uses: taiki-e/install-action@cargo-llvm-cov + - name: Generate coverage + run: cargo llvm-cov --lcov --output-path lcov.info + - name: Report to codecov.io + uses: codecov/codecov-action@v5 + with: + files: lcov.info + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: false