From e69bde8631e083334ff0e6e58ea3aa6cb191d16a Mon Sep 17 00:00:00 2001 From: Nicholas Gates Date: Tue, 17 Dec 2024 16:59:16 +0000 Subject: [PATCH] chore: collect coverage from Rust tests (#1470) Co-authored-by: Will Manning --- .github/workflows/ci.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4475b1e29..9104e88ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -125,7 +125,6 @@ jobs: - name: Rust Build (${{matrix.config.name}}) run: cargo hack ${{matrix.config.command}} ${{matrix.config.args}} --ignore-private - rust-test: name: "Rust (tests)" runs-on: ubuntu-latest @@ -152,7 +151,19 @@ jobs: done - name: Rust Test run: cargo test --workspace --all-features - + env: + # Enable coverage using -Zprofile flag + RUSTFLAGS: '-Zprofile' + RUSTDOCFLAGS: '-Zprofile' + - uses: rraval/actions-rs-grcov@e96292badb0d33512d16654efb0ee3032a9a3cff + id: grcov + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Coveralls + uses: coverallsapp/github-action@v2 + with: + file: "${{ steps.grcov.outputs.report }}" + license-check-and-audit-check: name: License Check and Audit Check runs-on: ubuntu-latest