mirror of
https://github.com/ClementTsang/bottom
synced 2024-11-26 22:20:18 +00:00
9a11ead991
Pins some actions using a specific commit hash.
48 lines
1.5 KiB
YAML
48 lines
1.5 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@38c3738dcac87b41e2b7038775457756c793566e # https://github.com/fkirc/skip-duplicate-actions/commit/38c3738dcac87b41e2b7038775457756c793566e
|
|
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@842ef286fff290e445b90b4002cc9807c3669641 # 1.3.0
|
|
with:
|
|
key: ${{ matrix.triple.target }}
|
|
|
|
- name: Generate code coverage
|
|
run: |
|
|
cargo tarpaulin --verbose --all-features --workspace --run-types AllTargets --timeout 120 --out Xml
|
|
|
|
- name: Upload to codecov.io
|
|
uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # 2.1.0
|
|
with:
|
|
fail_ci_if_error: true
|