mirror of
https://github.com/nushell/nushell.git
synced 2024-11-25 09:53:43 +01:00
Another shot at trying to setup codecov (#7948)
Trying to setup using https://github.com/taiki-e/cargo-llvm-cov#get-coverage-of-external-tests https://docs.codecov.com/docs/github-2-getting-a-codecov-account-and-uploading-coverage Closes #7944
This commit is contained in:
parent
cfd2cc4970
commit
23dfaa2933
37
.github/workflows/ci.yml
vendored
37
.github/workflows/ci.yml
vendored
@ -153,3 +153,40 @@ jobs:
|
||||
|
||||
- name: Tests
|
||||
run: cargo test --profile ci --package nu_plugin_*
|
||||
|
||||
|
||||
nu-coverage:
|
||||
needs: nu-tests
|
||||
env:
|
||||
NUSHELL_CARGO_TARGET: ci
|
||||
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
platform: [windows-latest, ubuntu-20.04]
|
||||
rust:
|
||||
- stable
|
||||
|
||||
runs-on: ${{ matrix.platform }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Rust toolchain and cache
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1.3.7
|
||||
- name: Install cargo-llvm-cov
|
||||
uses: taiki-e/install-action@cargo-llvm-cov
|
||||
|
||||
- name: Tests
|
||||
shell: bash
|
||||
run: |
|
||||
source <(cargo llvm-cov show-env --export-prefix) # Set the environment variables needed to get coverage.
|
||||
cargo llvm-cov clean --workspace # Remove artifacts that may affect the coverage results.
|
||||
cargo build --lib --bins --examples --workspace --profile ci
|
||||
cargo test --lib --bins --examples --workspace --profile ci --exclude nu_plugin_* ${{ matrix.flags }}
|
||||
cargo llvm-cov report --profile ci --lcov --output-path lcov.info
|
||||
|
||||
- name: Upload coverage reports to Codecov with GitHub Action
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
files: lcov.info
|
||||
|
Loading…
Reference in New Issue
Block a user