mirror of
https://github.com/ClementTsang/bottom
synced 2024-12-02 00:49:11 +00:00
48 lines
1.3 KiB
YAML
48 lines
1.3 KiB
YAML
# Code coverage generation via cargo-tarpaulin, and uploaded to codecov.
|
|
|
|
name: codecov
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
pre_job:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
|
steps:
|
|
- id: skip_check
|
|
uses: fkirc/skip-duplicate-actions@master
|
|
with:
|
|
concurrent_skipping: "same_content_newer"
|
|
skip_after_successful_duplicate: "true"
|
|
paths: '["tests/**", "src/**", ".github/workflows/codecov.yml", ".cargo/**", "Cargo.toml", "Cargo.lock", "build.rs"]'
|
|
do_not_skip: '["workflow_dispatch"]'
|
|
|
|
coverage:
|
|
needs: pre_job
|
|
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
|
|
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:
|
|
fail_ci_if_error: true
|