Skip to content
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

ci: enable test coverage tracking #641

Merged
merged 6 commits into from
Jun 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:

env:
CARGO_TERM_COLOR: always
RUST_VERSION_COV: nightly-2024-06-05
REGISTRY: ghcr.io

jobs:
Expand All @@ -35,6 +36,36 @@ jobs:
sh_checker_comment: false
sh_checker_exclude: "src"

publish-codecov:
name: Check code coverage (branch)
runs-on: ubuntu-latest
permissions: # Write access to push changes to pages
contents: write
steps:
- uses: actions/checkout@v3
- name: Install latest Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION_COV }}

- name: Install cargo-llvm-codecov
uses: taiki-e/install-action@cargo-llvm-cov

- name: Code coverage report
run: cargo +${{ env.RUST_VERSION_COV }} llvm-cov --all-features --lcov --branch --output-path lcov.info

- name: Setup LCOV
uses: hrishikesh-kadam/setup-lcov@v1

- name: Report code coverage
uses: zgosalvez/github-actions-report-lcov@v3
with:
coverage-files: lcov.info
minimum-coverage: 0 # for now we are not enforcing any minimum coverage.
artifact-name: code-coverage-report
github-token: ${{ secrets.REPO_TOKEN }}
update-comment: true

try-run-fuelup-init:
needs: cancel-previous-runs
if: github.event_name != 'release' || github.event.action != 'published'
Expand Down
Loading