mirror of
https://github.com/Xithrius/twitch-tui.git
synced 2024-09-11 13:45:30 +03:00
CodeCov CI integration
This commit is contained in:
parent
d749d8d417
commit
72c9741506
33
.github/workflows/ci.yml
vendored
33
.github/workflows/ci.yml
vendored
@ -82,20 +82,37 @@ jobs:
|
||||
- name: Check code for possible improvements
|
||||
run: cargo clippy -- -D warnings
|
||||
|
||||
# Prepare the Pull Request Payload artifact. If this fails, we
|
||||
# we fail silently using the `continue-on-error` option. It's
|
||||
# nice if this succeeds, but if it fails for any reason, it
|
||||
# does not mean that our lint-test checks failed.
|
||||
coverage:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust stable
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: llvm-tools
|
||||
|
||||
- name: Install cargo-llvm-cov
|
||||
uses: taiki-e/install-action@v2
|
||||
with:
|
||||
tool: cargo-llvm-cov
|
||||
|
||||
- name: Generate coverage
|
||||
run: cargo-llvm-cov llvm-cov --lcov --output-path "target/lcov.info" --all-features
|
||||
|
||||
- name: Upload to codecov.io
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
fail_ci_if_error: true
|
||||
|
||||
- name: Prepare Pull Request Payload artifact
|
||||
id: prepare-artifact
|
||||
if: always() && github.event_name == 'pull_request'
|
||||
continue-on-error: true
|
||||
run: cat $GITHUB_EVENT_PATH | jq '.pull_request' > pull_request_payload.json
|
||||
|
||||
# This only makes sense if the previous step succeeded. To
|
||||
# get the original outcome of the previous step before the
|
||||
# `continue-on-error` conclusion is applied, we use the
|
||||
# `.outcome` value. This step also fails silently.
|
||||
- name: Upload a Build Artifact
|
||||
if: always() && steps.prepare-artifact.outcome == 'success'
|
||||
continue-on-error: true
|
||||
|
Loading…
Reference in New Issue
Block a user