refactor: name the all-gates mode check-all

This commit is contained in:
Tianyi Cui
2026-07-22 18:27:31 +08:00
parent 7d58c2f1b8
commit fe273bd9dd
8 changed files with 19 additions and 19 deletions

View File

@@ -18,7 +18,7 @@ type Mode =
| 'ci-artifacts'
| 'node-compat'
| 'pre-push'
| 'manual-push'
| 'check-all'
| 'doc-sync'
type GateStatus = 'pending' | 'running' | 'passed' | 'failed' | 'skipped'
@@ -89,12 +89,12 @@ function parseMode(raw: string | undefined): Mode {
case 'ci-artifacts':
case 'node-compat':
case 'pre-push':
case 'manual-push':
case 'check-all':
case 'doc-sync':
return raw
default:
throw new Error(
`run-gates: expected mode ci-primary | ci-static | ci-lint | ci-coverage | ci-snapshot | ci-artifacts | node-compat | pre-push | manual-push | doc-sync, got ${JSON.stringify(raw)}.`,
`run-gates: expected mode ci-primary | ci-static | ci-lint | ci-coverage | ci-snapshot | ci-artifacts | node-compat | pre-push | check-all | doc-sync, got ${JSON.stringify(raw)}.`,
)
}
}
@@ -103,7 +103,7 @@ function defaultConcurrency(selectedMode: Mode, total: number): ConcurrencyDefau
const available = availableParallelism()
// Local modes cap workers: several doc gates each build a full ts.Program,
// so an uncapped default on a large host trades wall clock for memory blowups.
const localCap = selectedMode === 'pre-push' || selectedMode === 'manual-push' || selectedMode === 'doc-sync'
const localCap = selectedMode === 'pre-push' || selectedMode === 'check-all' || selectedMode === 'doc-sync'
const modeLimit = localCap ? Math.min(4, available) : available
return {
workers: Math.min(total, modeLimit),
@@ -194,7 +194,7 @@ function gatesForMode(selected: Mode): Gate[] {
], { label: 'JSONL Zstandard smoke' }),
]
case 'pre-push': return []
case 'manual-push':
case 'check-all':
return [
pnpmScript('runtime-closure', 'verify-runtime-closure', { label: 'runtime closure' }),
pnpmScript('cordis-config', 'verify-cordis-config', { label: 'Cordis config' }),
@@ -300,7 +300,7 @@ function coverageGate(): Gate {
}
// The snapshot suite boots the example bins in `lib` mode (built artifact under plain Node,
// plugins via real exports) — CI and manual-push already build, so they exercise what ships rather
// plugins via real exports) — CI and check-all already build, so they exercise what ships rather
// than the tsx/source path dev uses. It therefore waits on `build`.
function snapshotGate(): Gate {
return pnpmScript('snapshot', 'test:snapshot', {