use nextest for running tests

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

View File

@ -63,33 +63,17 @@ jobs:
- name: Cache dependencies - name: Cache dependencies
uses: Swatinem/rust-cache@v2 uses: Swatinem/rust-cache@v2
- name: Create necessary directories - name: Install nextest
run: mkdir -p target/test-report run: cargo binstall -y cargo-nextest --secure
- name: Run tests - name: Run tests
run: | run: |
cargo test --all-features --release --no-fail-fast -- -Zunstable-options --format json --report-time \ cargo nextest run --all-features --release --no-fail-fast
| tee target/test-report/test-report.json
env: env:
RUST_LOG: "trace"
RUSTFLAGS: "-Cinstrument-coverage" RUSTFLAGS: "-Cinstrument-coverage"
LLVM_PROFILE_FILE: "target/coverage/%p-%m.profraw" 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 - name: Install grcov
run: cargo binstall -y grcov run: cargo binstall -y grcov

View File

@ -3,7 +3,7 @@ rm -rf target/coverage || true
mkdir -p target/coverage mkdir -p target/coverage
echo "Running tests" 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" echo "Generating coverage report"
grcov \ grcov \