mirror of
https://github.com/haraldh/chainerror.git
synced 2025-01-31 00:56:41 +01:00
ci: use codecov for coverage
Signed-off-by: Harald Hoyer <harald@hoyer.xyz>
This commit is contained in:
parent
bb5f372a92
commit
376e133836
55
.github/workflows/coverage.yml
vendored
55
.github/workflows/coverage.yml
vendored
|
@ -1,22 +1,43 @@
|
||||||
name: coverage
|
name: coverage
|
||||||
|
|
||||||
|
on:
|
||||||
|
# Trigger the workflow on push or pull request,
|
||||||
|
# but only for the master branch
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
release:
|
||||||
|
types:
|
||||||
|
- created
|
||||||
|
|
||||||
on: [ "push" , "pull_request" ]
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
name: coverage
|
name: coverage
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
|
||||||
image: xd009642/tarpaulin
|
|
||||||
options: --security-opt seccomp=unconfined
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- uses: actions/checkout@v1
|
||||||
uses: actions/checkout@v2
|
- uses: dtolnay/rust-toolchain@master
|
||||||
|
|
||||||
- name: Generate code coverage
|
|
||||||
run: |
|
|
||||||
cargo tarpaulin --verbose --workspace --timeout 120 --out Lcov --output-dir coverage
|
|
||||||
|
|
||||||
- name: Upload to coveralls
|
|
||||||
uses: coverallsapp/github-action@master
|
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
target: x86_64-unknown-linux-gnu
|
||||||
|
toolchain: nightly
|
||||||
|
components: llvm-tools-preview
|
||||||
|
|
||||||
|
- name: Install cargo-llvm-cov
|
||||||
|
run: >
|
||||||
|
curl -LsSf 'https://github.com/taiki-e/cargo-llvm-cov/releases/download/v0.5.23/cargo-llvm-cov-x86_64-unknown-linux-musl.tar.gz'
|
||||||
|
| tar xzf -
|
||||||
|
&& mv cargo-llvm-cov $HOME/.cargo/bin
|
||||||
|
|
||||||
|
- name: Run cargo-llvm-cov
|
||||||
|
run: cargo llvm-cov --doctests --all --all-features --lcov --output-path lcov.info
|
||||||
|
|
||||||
|
- name: Upload coverage to Codecov
|
||||||
|
uses: codecov/codecov-action@v3
|
||||||
|
with:
|
||||||
|
directory: ./
|
||||||
|
fail_ci_if_error: false
|
||||||
|
files: ./lcov.info
|
||||||
|
verbose: true
|
||||||
|
|
Loading…
Reference in a new issue