coverage #23
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
name: coverage | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- "**.rs" | |
- "Cargo.toml" | |
- "tarpaulin.toml" | |
pull_request: | |
branches: [ main ] | |
paths: | |
- "**.rs" | |
- "Cargo.toml" | |
- "tarpaulin.toml" | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: dtolnay/rust-toolchain@nightly | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install tarpaulin | |
run: cargo install cargo-tarpaulin | |
- name: Generate code coverage | |
run: cargo tarpaulin --out Xml | |
- name: Upload to codecov.io | |
uses: codecov/codecov-action@v3 | |
with: | |
# token: ${{secrets.CODECOV_TOKEN}} # not required for public repos | |
fail_ci_if_error: true |