diff --git a/.gitea/workflows/build-and-test.yml b/.gitea/workflows/build-and-test.yml index afe1b1d..24f12a6 100644 --- a/.gitea/workflows/build-and-test.yml +++ b/.gitea/workflows/build-and-test.yml @@ -63,33 +63,17 @@ jobs: - name: Cache dependencies uses: Swatinem/rust-cache@v2 - - name: Create necessary directories - run: mkdir -p target/test-report + - name: Install nextest + run: cargo binstall -y nextest - 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 \