Skip to content

Update test_coverage.yml #10

Update test_coverage.yml

Update test_coverage.yml #10

Workflow file for this run

name: tests with coverage
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Test
env:
PROJECT_NAME_UNDERSCORE: phylo
CARGO_INCREMENTAL: 0
RUSTFLAGS: -Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort
RUSTDOCFLAGS: -Cpanic=abort
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- name: Generate test result and coverage report
run: |
cargo install cargo2junit grcov;
cargo build --manifest-path ./phylo/Cargo.toml
cargo test --manifest-path ./phylo/Cargo.toml -- -Z unstable-options --format json | cargo2junit > results.xml;
grcov . -s . --binary-path ./phylo/target/debug/ -t lcov --branch --ignore-not-existing lcov.info;
- name: Upload test results
uses: EnricoMi/publish-unit-test-result-action@v1
with:
check_name: Test Results
github_token: ${{ secrets.GITHUB_TOKEN }}
files: results.xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
files: lcov.info