From bf8d9c659f0af76caf41205cee92d25aac64b389 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Wed, 7 Oct 2026 23:32:05 +0200 Subject: [PATCH] chore: allow skipping tests in the release script PI_RELEASE_SKIP_TESTS=1 skips ./test.sh when the suite already passed in release:local and the machine is too loaded for timing-sensitive tests. --- .pi/skills/release.md | 2 ++ scripts/release.mjs | 12 +++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.pi/skills/release.md b/.pi/skills/release.md index 13d42f889..912b976af 100644 --- a/.pi/skills/release.md +++ b/.pi/skills/release.md @@ -39,6 +39,8 @@ Run repository commands from the repo root (two directories above this skill), u PI_ALLOW_LOCKFILE_CHANGE=1 npm_config_min_release_age=0 npm run release:patch # fixes + additions PI_ALLOW_LOCKFILE_CHANGE=1 npm_config_min_release_age=0 npm run release:minor # breaking changes ``` + If the test suite already passed in `npm run release:local` and only fails from machine load, `PI_RELEASE_SKIP_TESTS=1` skips `./test.sh` in the release script; checks and the packed install check still run. Use it only with the user's approval. + Use `npm_config_min_release_age=0` only for the release command. The repo's normal npm age gate can otherwise block the release lockfile refresh when the current workspace package version was published recently. Review any lockfile or install lock diffs the release creates before push. The release script refreshes the Nix model catalog pin (`nix/model-catalog.json`) if stale, bumps all package versions, updates changelogs, regenerates release artifacts, runs `npm run check`, commits `Release vX.Y.Z`, tags `vX.Y.Z`, adds fresh `## [Unreleased]` changelog sections, commits `Add [Unreleased] section for next cycle`, then pushes `main` and the tag. Do not rerun the release script after a tag was pushed. diff --git a/scripts/release.mjs b/scripts/release.mjs index c7db8a3ba..e5e5af6be 100755 --- a/scripts/release.mjs +++ b/scripts/release.mjs @@ -257,9 +257,15 @@ console.log("Building packages for tests..."); run("npm run build:offline"); console.log(); -console.log("Running tests..."); -run("./test.sh"); -console.log(); +// PI_RELEASE_SKIP_TESTS=1 skips the test suite, e.g. when it already passed in `npm run release:local` +// and an overloaded machine makes timing-sensitive tests fail. Checks and the install check still run. +if (process.env.PI_RELEASE_SKIP_TESTS === "1") { + console.log("Skipping tests (PI_RELEASE_SKIP_TESTS=1)\n"); +} else { + console.log("Running tests..."); + run("./test.sh"); + console.log(); +} console.log("Checking the packed coding-agent consumer install..."); run("npm run check:package-install");