-
-
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.
Merge pull request #30 from moka-rs/codecov
CI: codecov.io - Measure the code coverage with `cargo-llvm-cov` and upload the report to codecov.io
- Loading branch information
Showing
2 changed files
with
52 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,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 |
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,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 }} |