ci: add codecov (#608)

Adds codecov to the workflow suite.
This commit is contained in:
Clement Tsang 2021-11-25 20:40:13 -05:00 committed by GitHub
parent a64b896b17
commit 1f6a2a8391
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 40 additions and 0 deletions

40
.github/workflows/codecov.yml vendored Normal file
View File

@ -0,0 +1,40 @@
# Codecov generation via cargo-tarpaulin.
name: coverage
on:
workflow_dispatch:
push:
branches:
- master
paths-ignore:
- "README.md"
- "docs/**"
- ".github/ISSUE_TEMPLATE/**"
- "CHANGELOG.md"
- "CONTRIBUTING.md"
jobs:
test:
name: coverage
runs-on: ubuntu-latest
container:
image: xd009642/tarpaulin:develop
options: --security-opt seccomp=unconfined
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v1
with:
key: ${{ matrix.triple.target }}
- name: Generate code coverage
run: |
cargo tarpaulin --verbose --all-features --workspace --timeout 120 --out Xml
- name: Upload to codecov.io
uses: codecov/codecov-action@v2
with:
token: ${{secrets.CODECOV_TOKEN}}
fail_ci_if_error: true