diff --git a/.config/nextest.toml b/.config/nextest.toml new file mode 100644 index 000000000..76fd74b5d --- /dev/null +++ b/.config/nextest.toml @@ -0,0 +1,2 @@ +[profile.ci.junit] +path = "junit.xml" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0d03d6cea..b4cfc8064 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,7 +54,7 @@ jobs: # ───────────────────────── 2 · TEST & COVERAGE ──────────────────────────── coverage: - name: Unit Tests + Coverage (llvm-cov) + name: Unit Tests + Coverage (llvm-cov + nextest) runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -70,17 +70,38 @@ jobs: - uses: taiki-e/install-action@v2 with: { tool: cargo-llvm-cov } + - uses: taiki-e/install-action@v2 + with: { tool: nextest } - - name: Run tests and generate lcov.info + # ---------- Run the suite through nextest ---------- + - name: Run tests via llvm-cov/nextest + id: run_tests run: | - cargo llvm-cov --locked --lib \ - --lcov --output-path lcov.info + cargo llvm-cov \ + --locked \ + --lib \ + --lcov --output-path lcov.info \ + nextest \ + --profile ci \ + --no-fail-fast + + # ---------- Upload JUnit test results to Codecov ---------- + - name: Upload test results (JUnit) + if: ${{ !cancelled() }} + uses: codecov/test-results-action@v1 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + with: + files: target/nextest/ci/junit.xml + fail_ci_if_error: true - - name: Upload to Codecov + # ---------- Upload coverage report to Codecov ---------- + - name: Upload coverage (lcov) + if: ${{ !cancelled() }} uses: codecov/codecov-action@v5 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} with: files: lcov.info - verbose: true fail_ci_if_error: true +