Skip to content

Adding back github test results #23

Adding back github test results

Adding back github test results #23

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
runs-on: ubuntu-latest
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: -Cinstrument-coverage -Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort
RUSTDOCFLAGS: -Cpanic=abort
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;
rustup component add llvm-tools-preview;
cargo test --manifest-path ./phylo/Cargo.toml -- -Z unstable-options --format json | cargo2junit > results.xml;
grcov . -s . --binary-path ./phylo/target/debug/deps -t lcov --branch --ignore "**/lib.rs" --ignore "**/*tests.rs" -o 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