You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
perf(ci): parallelize the repo audits and guard env-dependent tests
The 21 independent audits ran as 21 sequential CI steps, each a single-threaded
read-only walk of the tree. scripts/run-audits.ts runs them concurrently:
28s serial -> 5.0s wall locally at 13-way. It buffers each audit's output and
replays only failures, so a green run stays quiet and a red one still names the
audit and shows why. Audits needing a git base ref (block registry, migration
safety) or that write files (drizzle generate) stay as their own steps.
Also fixes 5 tests that fail for every macOS dev and are invisible in CI. They
shell out to python3 using `match` statements and 3.12 f-string nesting, which
need >= 3.10; stock macOS ships 3.9.6, so `bun run test` produced raw Python
SyntaxErrors with no guard and nothing tying them to a missing tool. One also
needs ripgrep, which CI installs and a Mac usually does not.
@sim/testing/environment detects both and the tests skip with a reason via
vitest's ctx.skip(). Under CI it throws instead: these suites deliberately run
the real helper rather than a mock -- the cloud-review path/read-size bounds and
the placeholder compiler's generated Python are only observable that way -- so a
missing tool in CI means a security boundary silently stopped being covered,
which is worse than a red build.
Drops the Codecov upload. The workflow already documented it as a dead path:
nothing generates apps/sim/coverage, vitest runs without --coverage, and
fail_ci_if_error hides it, so it reported green having uploaded nothing.
`${tool} is required to run this suite and was not found. CI must never skip these tests — they cover behavior that is only observable by running the real tool. ${hint}`
29
+
)
30
+
}
31
+
if(!warned.has(tool)){
32
+
warned.add(tool)
33
+
console.warn(`[@sim/testing] Skipping tests that require ${tool}. ${hint}`)
34
+
}
35
+
returnfalse
36
+
}
37
+
38
+
/** Parses `python3 --version`, returning null when the interpreter is missing or unreadable. */
* True when `python3` resolves to at least {@link MIN_PYTHON}.
48
+
*
49
+
* macOS ships 3.9 as the system `python3` and Homebrew's newer builds are not linked as
50
+
* `python3`, so this is false on a stock Mac even when a modern Python is installed.
51
+
*/
52
+
exportfunctionhasPython3(): boolean{
53
+
constversion=detectPython3()
54
+
const[minMajor,minMinor]=MIN_PYTHON
55
+
constlabel=`python3 >= ${minMajor}.${minMinor}`
56
+
consthint=`Found ${version ? `${version.major}.${version.minor}` : 'no python3 on PATH'}. Install a newer Python (e.g. \`brew install python@3.13\`) and put it on PATH ahead of /usr/bin.`
0 commit comments