Skip to content

Commit e69bde8

Browse files
gatesnlwwmanning
andauthored
chore: collect coverage from Rust tests (#1470)
Co-authored-by: Will Manning <[email protected]>
1 parent 8e0e25c commit e69bde8

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ jobs:
125125
- name: Rust Build (${{matrix.config.name}})
126126
run: cargo hack ${{matrix.config.command}} ${{matrix.config.args}} --ignore-private
127127

128-
129128
rust-test:
130129
name: "Rust (tests)"
131130
runs-on: ubuntu-latest
@@ -152,7 +151,19 @@ jobs:
152151
done
153152
- name: Rust Test
154153
run: cargo test --workspace --all-features
155-
154+
env:
155+
# Enable coverage using -Zprofile flag
156+
RUSTFLAGS: '-Zprofile'
157+
RUSTDOCFLAGS: '-Zprofile'
158+
- uses: rraval/actions-rs-grcov@e96292badb0d33512d16654efb0ee3032a9a3cff
159+
id: grcov
160+
env:
161+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
162+
- name: Coveralls
163+
uses: coverallsapp/github-action@v2
164+
with:
165+
file: "${{ steps.grcov.outputs.report }}"
166+
156167
license-check-and-audit-check:
157168
name: License Check and Audit Check
158169
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)