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.
This commit is contained in:
Armin Ronacher 2026-10-07 23:32:05 +02:00
parent e916310705
commit bf8d9c659f
2 changed files with 11 additions and 3 deletions

View file

@ -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.

View file

@ -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");