From fe81a08b8767b53f2f1b35b8c2ab7f79794f5167 Mon Sep 17 00:00:00 2001 From: James Ding Date: Sun, 31 May 2026 00:36:54 -0700 Subject: [PATCH 1/4] ci: run tests with cargo-nextest Replace `cargo test` with `cargo nextest run --profile ci` in the test matrix and add a nextest `ci` profile that emits JUnit XML. nextest is installed in CI via taiki-e/install-action, matching how cargo-llvm-cov and cargo-hack are already provisioned. --- .config/nextest.toml | 3 +++ .github/workflows/rust.yml | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 .config/nextest.toml diff --git a/.config/nextest.toml b/.config/nextest.toml new file mode 100644 index 0000000..f40c8e3 --- /dev/null +++ b/.config/nextest.toml @@ -0,0 +1,3 @@ +# JUnit output for Codecov Test Analytics (used by the `ci` profile in CI). +[profile.ci.junit] +path = "junit.xml" diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index cb19460..93c93a9 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -56,7 +56,8 @@ jobs: steps: - uses: actions/checkout@v4 - uses: actions-rust-lang/setup-rust-toolchain@v1 - - run: cargo test + - uses: taiki-e/install-action@nextest + - run: cargo nextest run --profile ci coverage: name: Coverage From d1ffb1b2c9dbb87f4382ccf705e99bfe7b8ce096 Mon Sep 17 00:00:00 2001 From: James Ding Date: Sun, 31 May 2026 00:37:04 -0700 Subject: [PATCH 2/4] ci: upload test results to Codecov Test Analytics Add a codecov/test-results-action@v1 step that uploads the JUnit report from the nextest `ci` profile. Gated to ubuntu-latest so the three-OS matrix produces a single upload per run, and runs on failure (`!cancelled()`) so failing tests are still reported. --- .github/workflows/rust.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 93c93a9..706d54b 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -58,6 +58,12 @@ jobs: - uses: actions-rust-lang/setup-rust-toolchain@v1 - uses: taiki-e/install-action@nextest - run: cargo nextest run --profile ci + - name: Upload test results to Codecov + if: ${{ !cancelled() && matrix.os == 'ubuntu-latest' }} + uses: codecov/test-results-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: target/nextest/ci/junit.xml coverage: name: Coverage From 58586b16100a2cd0bb03745f881797c98b648d24 Mon Sep 17 00:00:00 2001 From: James Ding Date: Sun, 31 May 2026 00:40:14 -0700 Subject: [PATCH 3/4] ci: use codecov-action@v5 for test results codecov/test-results-action is deprecated; switch to codecov-action@v5 with report_type: test_results, matching the coverage job's action and token style. --- .github/workflows/rust.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 706d54b..0474d2c 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -60,10 +60,12 @@ jobs: - run: cargo nextest run --profile ci - name: Upload test results to Codecov if: ${{ !cancelled() && matrix.os == 'ubuntu-latest' }} - uses: codecov/test-results-action@v1 + uses: codecov/codecov-action@v5 with: - token: ${{ secrets.CODECOV_TOKEN }} + report_type: test_results files: target/nextest/ci/junit.xml + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} coverage: name: Coverage From 6733c6da0124b73ad1c39279c00ecc2303003dd2 Mon Sep 17 00:00:00 2001 From: James Ding Date: Sun, 31 May 2026 00:50:06 -0700 Subject: [PATCH 4/4] ci: drop CODECOV_TOKEN from test results upload Public repo uploads are tokenless via GitHub Actions OIDC. --- .github/workflows/rust.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 0474d2c..6a0b1b2 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -64,8 +64,6 @@ jobs: with: report_type: test_results files: target/nextest/ci/junit.xml - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} coverage: name: Coverage