Skip to content

Commit

Permalink
updload coverage workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ggonzalez94 committed Jul 20, 2024
1 parent bef2485 commit 6b8a547
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/codecov-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
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:
push:
branches:
- 'codecov-coverage'

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

0 comments on commit 6b8a547

Please sign in to comment.