Test/cov report #8
Workflow file for this run
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: Code Coverage | |
on: [push, pull_request, workflow_dispatch] | |
jobs: | |
base_branch_cov: | |
name: run-base-coverage | |
runs-on: ubuntu-latest | |
container: | |
image: xd009642/tarpaulin:develop | |
options: --security-opt seccomp=unconfined | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Generate code coverage | |
run: | | |
cargo tarpaulin --skip-clean --ignore-tests --exclude-files src/bin/schema.rs --frozen --engine llvm --out Lcov --out-dir coverage | |
- name: Upload code coverage for ref branch | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ref-lcov.info | |
path: ./coverage/lcov.info | |
checks: | |
name: check-coverage | |
runs-on: ubuntu-latest | |
needs: base_branch_cov | |
container: | |
image: xd009642/tarpaulin:develop | |
options: --security-opt seccomp=unconfined | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Download code coverage report from base branch | |
uses: actions/download-artifact@v3 | |
with: | |
name: ref-lcov.info | |
- name: Generate code coverage | |
run: | | |
cargo tarpaulin --skip-clean --ignore-tests --exclude-files src/bin/schema.rs --frozen --engine llvm --out Lcov | |
- name: Generate code coverage report | |
id: code-coverage | |
uses: barecheck/code-coverage-action@v1 | |
with: | |
barecheck-github-app-token: ${{ secrets.BARECHECK_GITHUB_APP_TOKEN }} | |
lcov-file: "./coverage/lcov.info" | |
base-lcov-file: "./lcov.info" | |
minimum-ratio: 0 # Fails Github action once code coverage is decreasing | |
send-summary-comment: true | |
show-annotations: "" # Possible options warning|error | |
github-token: ${{ secrets.GITHUB_TOKEN }} |