-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
111 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,12 @@ concurrency: | |
|
||
jobs: | ||
check: | ||
permissions: | ||
pull-requests: write | ||
id-token: write | ||
pages: write | ||
checks: write | ||
|
||
runs-on: ubuntu-24.04-8core-bakunin | ||
|
||
steps: | ||
|
@@ -49,3 +55,60 @@ jobs: | |
RUST_BACKTRACE: 1 | ||
SKIP_WASM_BUILD: 1 | ||
run: cargo test | ||
|
||
- uses: jwalton/gh-find-current-pr@v1 | ||
id: findPr | ||
|
||
- name: Install cargo-llvm-cov | ||
if: success() && steps.findPr.outputs.number | ||
uses: taiki-e/install-action@cargo-llvm-cov | ||
|
||
- name: Install cargo-xtask | ||
if: success() && steps.findPr.outputs.number | ||
run: cargo install cargo-xtask | ||
|
||
- name: Generate code coverage lcov | ||
if: success() && steps.findPr.outputs.number | ||
run: cargo xtask coverage | ||
|
||
- name: Generate code coverage html | ||
if: success() && steps.findPr.outputs.number | ||
run: cargo xtask coverage --html | ||
|
||
- name: Upload html coverage report | ||
if: success() && steps.findPr.outputs.number | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: 'target/llvm-cov/html' | ||
|
||
- name: Deploy to GitHub Pages | ||
if: success() && steps.findPr.outputs.number | ||
id: deployment | ||
uses: actions/deploy-pages@v4 | ||
|
||
- name: Generate Coverage Summary Report | ||
if: success() && steps.findPr.outputs.number | ||
uses: irongut/[email protected] | ||
with: | ||
filename: target/cov.xml | ||
badge: true | ||
format: markdown | ||
hide_branch_rate: false | ||
# hide_complexity: true | ||
indicators: true | ||
output: both | ||
|
||
- name: Append github pages link to report | ||
if: success() && steps.findPr.outputs.number | ||
run: echo '\n\n[Detailed coverage report]($GITHUB_PAGES_LINK)' &>> code-coverage-results.md | ||
env: | ||
GITHUB_PAGES_LINK: ${{ steps.deployment.page_url}} | ||
|
||
- name: Add Coverage PR Comment | ||
if: success() && steps.findPr.outputs.number | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
number: ${{ steps.finder.outputs.pr }} | ||
recreate: true | ||
path: code-coverage-results.md | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,8 @@ | |
pkgs.act | ||
# Python | ||
pkgs.python310 | ||
# Code coverage tool | ||
pkgs.cargo-llvm-cov | ||
]; | ||
in | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters