mirror of
https://github.com/starship/starship.git
synced 2024-11-24 01:03:31 +01:00
ci: add test coverage reporting with codecov (#3848)
This commit is contained in:
parent
21dfe7f2fc
commit
e61394a97a
11
.codecov.yml
Normal file
11
.codecov.yml
Normal file
@ -0,0 +1,11 @@
|
||||
comment: false
|
||||
coverage:
|
||||
status:
|
||||
project:
|
||||
default:
|
||||
target: auto
|
||||
threshold: 5%
|
||||
patch:
|
||||
default:
|
||||
target: auto
|
||||
threshold: 5%
|
17
.github/workflows/workflow.yml
vendored
17
.github/workflows/workflow.yml
vendored
@ -177,9 +177,13 @@ jobs:
|
||||
uses: actions-rs/toolchain@v1.0.7
|
||||
with:
|
||||
toolchain: ${{ matrix.rust }}
|
||||
components: llvm-tools-preview
|
||||
profile: minimal
|
||||
override: true
|
||||
|
||||
- name: Install cargo-llvm-cov
|
||||
uses: taiki-e/install-action@cargo-llvm-cov
|
||||
|
||||
# Install Mercurial (pre-installed on Linux and windows)
|
||||
- name: Setup | Mercurial (macos)
|
||||
if: matrix.os == 'macOS-latest'
|
||||
@ -187,7 +191,18 @@ jobs:
|
||||
|
||||
# Run the ignored tests that expect the above setup
|
||||
- name: Build | Test
|
||||
run: cargo test --workspace --locked --all-features -- -Z unstable-options --include-ignored
|
||||
run: "cargo llvm-cov
|
||||
--all-features
|
||||
--locked
|
||||
--workspace
|
||||
--lcov --output-path lcov.info
|
||||
-- --include-ignored"
|
||||
env:
|
||||
# Avoid -D warnings on nightly builds
|
||||
RUSTFLAGS: ""
|
||||
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
files: lcov.info
|
||||
fail_ci_if_error: true
|
||||
|
Loading…
Reference in New Issue
Block a user