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