Dev #8
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" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Install cargo-tarpaulin | |
uses: taiki-e/install-action@cargo-tarpaulin | |
- name: Run tests | |
run: cargo test | |
- name: Generate coverage report | |
run: | | |
cargo tarpaulin --verbose --workspace --timeout 120 --out xml --out html | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./cobertura.xml | |
fail_ci_if_error: true | |
verbose: true |