-
Notifications
You must be signed in to change notification settings - Fork 489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
include coverage instrumentation #797
Changes from 1 commit
205bbd3
a4d073d
dbc97fb
ca9ef94
cb0c50b
58378f5
92b5808
bb84984
8619aa3
115d735
b57d47a
1b9c353
1533c20
96cb03c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ jobs: | |
- name: install rust | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
components: rustfmt, clippy | ||
components: rustfmt, clippy, llvm-tools-preview | ||
toolchain: ${{ matrix.rust }} | ||
|
||
- name: caching | ||
|
@@ -52,11 +52,29 @@ jobs: | |
- name: run checks & tests | ||
run: RUST_MATRIX=${{ matrix.rust }} cargo xtask run-checks ${{ matrix.test }} | ||
|
||
- name: Install Grcov | ||
run: cargo install grcov | ||
|
||
- name: Run grcov | ||
run: grcov . --binary-path target/debug/deps/ -s . -t cobertura --branch --ignore-not-existing --ignore 'target/**' --ignore '../**' --ignore '/*' -o coverage.xml | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can upload the coverage results on codecov that better shows which lines of code are still not covered by tests, so we can replace There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok! I was using a vendorless approach, but Codecov is great. Is the Burn repo already set on Codecov? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is not necessary to set up anything, just the action is sufficient |
||
|
||
- name: Code Coverage Report | ||
uses: irongut/CodeCoverageSummary@v1.3.0 | ||
with: | ||
filename: coverage.xml | ||
badge: true | ||
fail_below_min: false | ||
format: markdown | ||
hide_branch_rate: false | ||
hide_complexity: false | ||
indicators: true | ||
output: both | ||
thresholds: '60 80' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can replace this action with codecov action: - name: Codecov upload
uses: codecov/codecov-action@v3
with:
files: lcov.info |
||
|
||
check-typos: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can re-insert this empty line, it seems a typo |
||
- name: run spelling checks using typos | ||
run: cargo xtask run-checks typos |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To speed up CI and save
grcov
binary in cache we can use the provided binaryThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍