forked from moonbeam-foundation/moonbeam
-
Notifications
You must be signed in to change notification settings - Fork 4
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
1 parent
e1cb96f
commit 406ecc4
Showing
1 changed file
with
40 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: codecov-coverage | ||
# This CI is run manually on-demand and performs a simple calculation of | ||
# unit tests coverage and reports it to CodeCov | ||
permissions: | ||
contents: read | ||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
coverage: | ||
runs-on: ubuntu-latest | ||
name: ubuntu / stable / coverage | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- name: Install stable | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: llvm-tools-preview | ||
|
||
- name: Install cargo-llvm-cov | ||
uses: taiki-e/install-action@cargo-llvm-cov | ||
|
||
- name: cargo generate-lockfile | ||
if: hashFiles('Cargo.lock') == '' | ||
run: cargo generate-lockfile | ||
|
||
- name: cargo llvm-cov | ||
run: cargo llvm-cov --locked --lcov --output-path lcov.info | ||
|
||
- name: Record Rust version | ||
run: echo "RUST=$(rustc --version)" >> "$GITHUB_ENV" | ||
|
||
- name: Upload to codecov.io | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
fail_ci_if_error: true | ||
env_vars: OS,RUST |