From 5869d1ac6771180cb5f014b6ee059da7d07bf21d Mon Sep 17 00:00:00 2001 From: h7x4 Date: Fri, 3 May 2024 17:20:00 +0200 Subject: [PATCH] use nextest for running tests --- .gitea/workflows/build-and-test.yml | 26 +++++--------------------- scripts/coverage.sh | 2 +- 2 files changed, 6 insertions(+), 22 deletions(-) diff --git a/.gitea/workflows/build-and-test.yml b/.gitea/workflows/build-and-test.yml index afe1b1d..a8d97db 100644 --- a/.gitea/workflows/build-and-test.yml +++ b/.gitea/workflows/build-and-test.yml @@ -59,37 +59,21 @@ jobs: toolchain: nightly 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 diff --git a/scripts/coverage.sh b/scripts/coverage.sh index a712de2..cdb5897 100755 --- a/scripts/coverage.sh +++ b/scripts/coverage.sh @@ -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 \