mirror of
https://github.com/haraldh/chainerror.git
synced 2025-04-17 21:32:53 +02:00
chore: update coverage workflow to simplify and modernize setup (#15)
Revised the GitHub Actions workflow for code coverage by updating dependencies, using modern, maintained actions, and improving configuration clarity. Streamlined Rust installation and replaced manual steps with dedicated actions for better reliability. Adjusted Codecov settings for stricter error handling.
This commit is contained in:
commit
0cee763264
35
.github/workflows/coverage.yml
vendored
35
.github/workflows/coverage.yml
vendored
|
@ -13,31 +13,24 @@ on:
|
||||||
types:
|
types:
|
||||||
- created
|
- created
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
coverage:
|
||||||
name: coverage
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v4
|
||||||
- uses: dtolnay/rust-toolchain@master
|
- name: Install Rust
|
||||||
with:
|
run: |
|
||||||
target: x86_64-unknown-linux-gnu
|
rustup update nightly
|
||||||
toolchain: nightly
|
|
||||||
components: llvm-tools-preview
|
|
||||||
|
|
||||||
- name: Install cargo-llvm-cov
|
- name: Install cargo-llvm-cov
|
||||||
run: >
|
uses: taiki-e/install-action@cargo-llvm-cov
|
||||||
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'
|
- name: Generate code coverage
|
||||||
| tar xzf -
|
run: cargo +nightly llvm-cov --all-features --workspace --codecov --doctests --output-path codecov.json
|
||||||
&& 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
|
- name: Upload coverage to Codecov
|
||||||
uses: codecov/codecov-action@v3
|
uses: codecov/codecov-action@v3
|
||||||
with:
|
with:
|
||||||
directory: ./
|
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
|
||||||
fail_ci_if_error: false
|
files: codecov.json
|
||||||
files: ./lcov.info
|
fail_ci_if_error: true
|
||||||
verbose: true
|
|
||||||
|
|
Loading…
Reference in a new issue