Stefan Holderbach 2023-02-11 19:44:35 +01:00 committed by GitHub
parent cfd2cc4970
commit 23dfaa2933
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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