fix(ci): install nextest for package tests

This commit is contained in:
luo jiyin authored and GitHub committed 2026-09-20 11:02:21 +08:00
1 parent d7e1b47aa4
commit db5e6f106b
2 files changed
+8 -2

No files matched your search

+3 -2
View File
@@ -82,14 +82,15 @@ test("native Rust driver caches exclude failed build artifacts", () => {
test("Rust test jobs install pinned nextest and retain separate doctests", () => { test("Rust test jobs install pinned nextest and retain separate doctests", () => {
const pluginDevHost = readFileSync(new URL("../workflows/plugin-dev-host.yml", import.meta.url), "utf8"); const pluginDevHost = readFileSync(new URL("../workflows/plugin-dev-host.yml", import.meta.url), "utf8");
const pluginRelease = readFileSync(new URL("../workflows/plugin-cli-release.yml", import.meta.url), "utf8"); const pluginRelease = readFileSync(new URL("../workflows/plugin-cli-release.yml", import.meta.url), "utf8");
const consumers = [job("rust-test"), job("agent-rust"), job("agent-integration"), const consumers = [job("packages"), job("rust-test"), job("agent-rust"), job("agent-integration"),
job("test", pluginDevHost), job("prepare", pluginRelease)]; job("test", pluginDevHost), job("prepare", pluginRelease)];
for (const content of consumers) { for (const content of consumers) {
assert.ok(content.includes("uses: taiki-e/install-action@9114bf4d891761788c546334fd37538eae1bf8b3")); assert.ok(content.includes("uses: taiki-e/install-action@9114bf4d891761788c546334fd37538eae1bf8b3"));
assert.ok(content.includes("tool: cargo-nextest@0.9.137")); assert.ok(content.includes("tool: cargo-nextest@0.9.137"));
assert.doesNotMatch(content, /cargo test (?!.*--doc)/); assert.doesNotMatch(content, /cargo test (?!.*--doc)/);
const testCommand = content.indexOf("cargo nextest run") >= 0 ? "cargo nextest run" const testCommand = content.indexOf("cargo nextest run") >= 0 ? "cargo nextest run"
: content.includes("ci-rust.mjs test") ? "ci-rust.mjs test" : "ci-agent-integration.sh"; : content.includes("pnpm test:packages") ? "pnpm test:packages"
: content.includes("ci-rust.mjs test") ? "ci-rust.mjs test" : "ci-agent-integration.sh";
assert.ok(content.indexOf("tool: cargo-nextest@0.9.137") < content.indexOf(testCommand)); assert.ok(content.indexOf("tool: cargo-nextest@0.9.137") < content.indexOf(testCommand));
} }
assert.ok(job("rust-test").includes('ci-rust.mjs doctest "$RUST_TEST_GROUP" "$RUST_FEATURE_MODE"')); assert.ok(job("rust-test").includes('ci-rust.mjs doctest "$RUST_TEST_GROUP" "$RUST_FEATURE_MODE"'));
+5
View File
@@ -209,6 +209,11 @@ jobs:
- name: Setup Rust - name: Setup Rust
uses: dtolnay/rust-toolchain@1.97.1 uses: dtolnay/rust-toolchain@1.97.1
- name: Install nextest
uses: taiki-e/install-action@9114bf4d891761788c546334fd37538eae1bf8b3 # v2.68.13
with:
tool: cargo-nextest@0.9.137
- name: Setup sccache - name: Setup sccache
uses: mozilla-actions/sccache-action@9e7fa8a12102821edf02ca5dbea1acd0f89a2696 # v0.0.10 uses: mozilla-actions/sccache-action@9e7fa8a12102821edf02ca5dbea1acd0f89a2696 # v0.0.10
with: with: