[PR #2530] [CLOSED] CI: run Rust tests with nextest #4400

Closed
opened 2026-11-03 04:16:53 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2530
Author: @rdbtCVS
Created: 10/26/2026
Status: ❌ Closed

Base: main ← Head: ci/nextest-verify


📝 Commits (1)

  • b5ccc4d CI: run Rust tests with nextest

📊 Changes

2 files changed (+14 additions, -2 deletions)

View changed files

📝 .github/workflows/ci.yml (+12 -1)
📝 crates/horizon-mods/tests/sandbox.rs (+2 -1)

📄 Description

🤖 Opened by rdbtCVS's AI agent (Codex, GPT-6.1), not by rdbtCVS personally.

What and why

Run verify's Rust library, binary and integration tests with cargo-nextest so tests from different executables can run concurrently. Download the pinned prebuilt nextest 0.9.150 archive and verify its SHA-256 before adding it to PATH. Preserve the existing workspace, targets, features, Rust-check condition and Cargo doc-test command.

Give each sandbox test process its own target/mods-test/mods-<pid> fixture directory. Nextest runs tests in separate processes, so the existing OnceLock cannot coordinate writes to a shared directory. This keeps sandbox tests parallel without concurrent fixture writers. A serial sandbox group took 58.6s for the expanded suite, versus 14.7s under Cargo; process-specific fixtures let nextest run the same 31 tests successfully in 17.1s.

Local warm-build benchmark on 93e3096e0688cc0e5e3c52e71e666246627d2207, using four physical cores and four test workers for both runners:

Runner Run 1 Run 2 Run 3 Median
Cargo 56.301s 55.206s 62.470s 56.301s
Nextest 33.953s 31.385s 30.681s 31.385s

That is 44.3% less execution time (1.79×). Every measured run passed the same 2,101 tests, with 36 ignored; inventory comparison confirmed identical sets of 87 executables. The PR branch's expanded sandbox suite was additionally validated under both Cargo and nextest after isolating its fixtures: 31 passed, 1 ignored in each.

Artifacts were compiled before the three-run benchmark, runner order alternated, and a private mount namespace hid Minecraft resources and desktop GPU devices to match verify's headless environment. CPU affinity and reported CPU topology both described the same four cores. Normal warm Cargo artifact checks and nextest discovery remained included. These are local execution results on the specified benchmark commit, not an estimate of total hosted CI time; compilation and doc tests are outside the measured saving.

Vanilla reference

None: CI and test tooling only.

Self-check

pr_ready (tools/pr_ready.py --quick on archlinux, against origin/main at 19bb6c126, 59 s)

Check Result
Scope ⚠️ 2 files, +14 −2; mixes CI, game
Cargo.lock ✅ unchanged
Public tree ✅ (2 s)
Python tests ✅ 320 passed (24 s)
rustfmt ✅ (6 s)
clippy ✅ (4 s)
tests: horizon-mods ✅ 67 passed (12 s)
doc tests ✅ 0 passed (1 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ✅ (2 s)
launcher clippy ✅ (1 s)
launcher tests ✅ 137 passed (5 s)
Parity ➖ 11 affected, to run in CI (--quick): creative_mining, cursor_death, cushion_placement, hardcore_respawn, lore_tooltip, pearl_death, remote_fireworks, spawn_loot, squid_client, structure_blocks, structure_start_nbt
Label skip-release

Additional validation:

  • actionlint -shellcheck= .github/workflows/ci.yml passed.
  • The exact CI installer script passed a smoke test: download, SHA-256 verification, extraction, nextest version and GITHUB_PATH entry.
  • Full unit/integration selection passed in all benchmark runs with identical pass/ignore counts and executable inventories.
  • The expanded sandbox suite passed under both runners with process-specific writable fixtures.
  • git diff --check passed.

Suggested label: skip-release.

🤖 Generated with OpenAI Codex


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/2530 **Author:** [@rdbtCVS](https://github.com/rdbtCVS) **Created:** 10/26/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `ci/nextest-verify` --- ### 📝 Commits (1) - [`b5ccc4d`](https://github.com/horizon-rust/horizon/commit/b5ccc4df0bf56d67492e487b2b7517cff6f4a732) CI: run Rust tests with nextest ### 📊 Changes **2 files changed** (+14 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/ci.yml` (+12 -1) 📝 `crates/horizon-mods/tests/sandbox.rs` (+2 -1) </details> ### 📄 Description > 🤖 Opened by rdbtCVS's AI agent (Codex, GPT-6.1), not by rdbtCVS personally. ## What and why Run verify's Rust library, binary and integration tests with cargo-nextest so tests from different executables can run concurrently. Download the pinned prebuilt nextest 0.9.150 archive and verify its SHA-256 before adding it to PATH. Preserve the existing workspace, targets, features, Rust-check condition and Cargo doc-test command. Give each sandbox test process its own `target/mods-test/mods-<pid>` fixture directory. Nextest runs tests in separate processes, so the existing `OnceLock` cannot coordinate writes to a shared directory. This keeps sandbox tests parallel without concurrent fixture writers. A serial sandbox group took 58.6s for the expanded suite, versus 14.7s under Cargo; process-specific fixtures let nextest run the same 31 tests successfully in 17.1s. Local warm-build benchmark on `93e3096e0688cc0e5e3c52e71e666246627d2207`, using four physical cores and four test workers for both runners: | Runner | Run 1 | Run 2 | Run 3 | Median | |---|---:|---:|---:|---:| | Cargo | 56.301s | 55.206s | 62.470s | 56.301s | | Nextest | 33.953s | 31.385s | 30.681s | 31.385s | That is **44.3% less execution time (1.79×)**. Every measured run passed the same 2,101 tests, with 36 ignored; inventory comparison confirmed identical sets of 87 executables. The PR branch's expanded sandbox suite was additionally validated under both Cargo and nextest after isolating its fixtures: **31 passed, 1 ignored** in each. Artifacts were compiled before the three-run benchmark, runner order alternated, and a private mount namespace hid Minecraft resources and desktop GPU devices to match verify's headless environment. CPU affinity and reported CPU topology both described the same four cores. Normal warm Cargo artifact checks and nextest discovery remained included. These are local execution results on the specified benchmark commit, not an estimate of total hosted CI time; compilation and doc tests are outside the measured saving. ## Vanilla reference None: CI and test tooling only. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on archlinux, against origin/main at 19bb6c126, 59 s) | Check | Result | | --- | --- | | Scope | ⚠️ 2 files, +14 −2; mixes CI, game | | Cargo.lock | ✅ unchanged | | Public tree | ✅ (2 s) | | Python tests | ✅ 320 passed (24 s) | | rustfmt | ✅ (6 s) | | clippy | ✅ (4 s) | | tests: horizon-mods | ✅ 67 passed (12 s) | | doc tests | ✅ 0 passed (1 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ✅ (2 s) | | launcher clippy | ✅ (1 s) | | launcher tests | ✅ 137 passed (5 s) | | Parity | ➖ 11 affected, to run in CI (--quick): creative_mining, cursor_death, cushion_placement, hardcore_respawn, lore_tooltip, pearl_death, remote_fireworks, spawn_loot, squid_client, structure_blocks, structure_start_nbt | | Label | `skip-release` | Additional validation: - `actionlint -shellcheck= .github/workflows/ci.yml` passed. - The exact CI installer script passed a smoke test: download, SHA-256 verification, extraction, nextest version and `GITHUB_PATH` entry. - Full unit/integration selection passed in all benchmark runs with identical pass/ignore counts and executable inventories. - The expanded sandbox suite passed under both runners with process-specific writable fixtures. - `git diff --check` passed. Suggested label: `skip-release`. 🤖 Generated with [OpenAI Codex](https://openai.com/codex/) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:16:53 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#4400
No description provided.