use nextest for running tests

This commit is contained in:
Oystein Kristoffer Tveit 2024-05-03 22:29:28 +02:00
parent 2736d1d7ad
commit ebac8c0306
Signed by: oysteikt
GPG Key ID: 9F2F7D8250F35146
2 changed files with 6 additions and 22 deletions

View File

@ -60,36 +60,20 @@ jobs:
override: true
components: llvm-tools-preview
- name: Install nextest
run: cargo binstall -y nextest
- name: Cache dependencies
uses: Swatinem/rust-cache@v2
- name: Create necessary directories
run: mkdir -p target/test-report
- name: Run tests
run: |
cargo test --all-features --release --no-fail-fast -- -Zunstable-options --format json --report-time \
| tee target/test-report/test-report.json
cargo nextest run --all-features --release --no-fail-fast
env:
RUST_LOG: "trace"
RUSTFLAGS: "-Cinstrument-coverage"
LLVM_PROFILE_FILE: "target/coverage/%p-%m.profraw"
- name: Install markdown-test-report
run: cargo binstall -y markdown-test-report
- name: Generate test report
run: markdown-test-report target/test-report/test-report.json --output target/test-report/test-report.md
- name: Upload test report
uses: https://git.pvv.ntnu.no/oysteikt/rsync-action@main
with:
source: target/test-report/test-report.md
target: mpvipc/${{ gitea.ref_name }}/
username: oysteikt
ssh-key: ${{ secrets.OYSTEIKT_GITEA_WEBDOCS_SSH_KEY }}
host: microbel.pvv.ntnu.no
known-hosts: "microbel.pvv.ntnu.no ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEq0yasKP0mH6PI6ypmuzPzMnbHELo9k+YB5yW534aKudKZS65YsHJKQ9vapOtmegrn5MQbCCgrshf+/XwZcjbM="
- name: Install grcov
run: cargo binstall -y grcov

View File

@ -3,7 +3,7 @@ rm -rf target/coverage || true
mkdir -p target/coverage
echo "Running tests"
RUST_LOG=mpvipc=trace RUSTFLAGS="-Cinstrument-coverage" LLVM_PROFILE_FILE="target/coverage/%p-%m.profraw" cargo test --all-features --release --no-fail-fast
RUST_LOG=mpvipc=trace RUSTFLAGS="-Cinstrument-coverage" LLVM_PROFILE_FILE="target/coverage/%p-%m.profraw" cargo nextest run --all-features --release --no-fail-fast
echo "Generating coverage report"
grcov \