Skip to content

ci: verify behaviour on every platform and halve the macOS queue - #361

Merged
PathGao merged 1 commit into
sftwrdotdev:masterfrom
PathGao:fix/run-tests-on-every-platform
Aug 2, 2026
Merged

ci: verify behaviour on every platform and halve the macOS queue#361
PathGao merged 1 commit into
sftwrdotdev:masterfrom
PathGao:fix/run-tests-on-every-platform

Conversation

@PathGao

@PathGao PathGao commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

test.yml runs npm run check, npm test and cargo test on a single ubuntu-22.04 runner. test_build.yml has a platform matrix but only builds.

The matrix therefore proves the tree compiles everywhere and nothing more. A Windows- or macOS-only behavioural regression in the cfg-gated paths — which is exactly where this project's platform-parity bugs keep landing — reaches a release build unchallenged.

This runs the suites inside the matrix, and pays for the added time twice over.

Why the matrix shrinks

The matrix built macOS twice, once per architecture. Measured across the currently open pull requests:

job runs in waits for a runner
linux 9m10s starts immediately
windows 10m19s starts immediately
macos-aarch64 6m06s 19–30 min
macos-x64 8m10s 19–30 min, several still queued

macOS jobs are the fastest here and the slowest to start: capacity, not duration, is the constraint, and every pull request was taking two of those slots.

One entry targeting universal-apple-darwin takes one slot and covers strictly more. It compiles both architectures, so an Intel-only break still fails the check — and it fails on the same artifact the release produces, rather than on a pair of single-arch binaries nothing ships.

Why the concurrency group

Each push to a pull request queued another full matrix while the previous one was still waiting for a runner, and both then competed for the same macOS capacity. Several open pull requests are currently showing duplicated test, linux and windows checks from exactly this. Superseded runs are now cancelled.

Notes

  • npm test is pinned to shell: bash — its script globs scripts/*.test.ts, and the Windows runner's default pwsh neither expands the glob nor strips the quotes.
  • cargo test uses working-directory rather than cd … && …, so it does not depend on the shell's operator support.
  • The Rust toolchain step already installs both Apple targets for macos-latest, and the artifact upload already globs src-tauri/target/*/release/bundle/…, so both keep working unchanged.
  • Also ignores dist/, .cache/ and .worktrees/, none of which have tracked files today.

Validation

  • Workflow parses; step order confirmed as install → npm testcargo test → build across all three matrix entries.
  • Both suites were run on a Windows runner ahead of this PR, on a branch carrying the tab-menu and PDF fixes: npm test and cargo test both pass there. That was their first execution on Windows and it found no platform-specific failures — the coverage this PR establishes starts from a green baseline.

test.yml runs `npm run check`, `npm test` and `cargo test` on a single
ubuntu-22.04 runner. test_build.yml has a platform matrix but only builds.
So the matrix proves the tree compiles everywhere and nothing more: a
Windows- or macOS-only behavioural regression in the cfg-gated paths --
which is where this project's platform-parity bugs keep landing -- reaches a
release build unchallenged.

Run the suites inside the matrix. `npm test` is pinned to bash: its script
globs `scripts/*.test.ts`, and the Windows runner's default pwsh neither
expands the glob nor strips the quotes. cargo test uses `working-directory`
rather than `cd ... && ...` so it does not depend on the shell's operator
support.

That would have made a queue problem worse, so two changes pay for it.

The matrix built macOS twice, once per architecture. Measured across the
open pull requests, those jobs run in 6-8 minutes but wait 20-30 for a slot,
while Linux and Windows start immediately and finish in 9-10 -- macOS
capacity, not job duration, is the constraint, and every pull request was
taking two of those slots. One entry targeting `universal-apple-darwin`
takes one slot and covers strictly more: it compiles both architectures, so
an Intel-only break still fails the check, and it fails on the same artifact
the release produces rather than on a pair of binaries nothing ships.

A concurrency group cancels superseded runs. Each push to a pull request
queued another full matrix while the previous one was still waiting, and
both then competed for the same runners; several open pull requests were
showing duplicated checks from exactly this.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@PathGao
PathGao force-pushed the fix/run-tests-on-every-platform branch from bd362d2 to 3050647 Compare August 2, 2026 18:01
@PathGao PathGao changed the title ci: run the test suites on every platform ci: verify behaviour on every platform and halve the macOS queue Aug 2, 2026
@PathGao
PathGao merged commit 10db5ea into sftwrdotdev:master Aug 2, 2026
4 checks passed
@PathGao
PathGao deleted the fix/run-tests-on-every-platform branch August 2, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant