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: codecov.io - Measure the code coverage with cargo-llvm-cov and upload the report to codecov.io #30

Merged
merged 1 commit into from
Jun 9, 2024
Merged
Show file tree
Hide file tree
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
13 changes: 13 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# https://docs.codecov.com/docs/quick-start#tips-and-tricks
# https://docs.codecov.com/docs/codecovyml-reference

coverage:
status:
project:
default:
informational: true
patch: false

comment:
layout: "diff"
require_changes: true
39 changes: 39 additions & 0 deletions .github/workflows/Codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Codecov

on:
pull_request:
paths-ignore:
- '.devcontainer/**'
- '.gitpod.yml'
- '.vscode/**'

jobs:
codecov:
runs-on: ubuntu-latest
steps:
- name: Checkout Mini Moka
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable

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

- run: cargo clean

- name: Show cargo tree
run: cargo tree

- name: Run tests (debug, sync feature)
run: cargo llvm-cov --features sync --lcov --output-path lcov.info

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
files: ./lcov.info
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}