Skip to content

Nothing runs the tests until a release tag is pushed: add CI across ubuntu, macos and windows - #21

Closed
domidex01 wants to merge 3 commits into
flowtricks:mainfrom
domidex01:issue/ci
Closed

domidex01 wants to merge 3 commits into
flowtricks:mainfrom
domidex01:issue/ci

Conversation

@domidex01

Copy link
Copy Markdown

Stacked on #20 (the first commit here is that PR's test runner; the diff this PR adds is .github/workflows/ci.yml alone).

The gap

release.yml is the only workflow, and it triggers on v* tags. It builds and signs; it never runs npm test. No push or pull-request workflow exists — so between two releases, the suite only ever runs on the machine a change was written on.

The cost is concrete: on a fresh Windows checkout, 10 of 110 test files fail and the repository shows no sign of it, because none of them fail on macOS:

code-search  field-focus  git-branches  git-snapshot  panel-field
popover-dropdown  preview-worktree  section-dot  starter  vars-row-height

(Verified today on Windows 11, Node 22: 100 passed, 10 failed, exactly those files.)

The workflow

ci.yml runs npm ci && npm test on ubuntu-latest, macos-latest and windows-latest for every pull request and every push to main:

  • fail-fast: false, so one platform's red doesn't cancel and hide another's.
  • Node 22 with npm cache, matching release.yml.
  • The Linux leg runs under xvfb-run and lifts Ubuntu 24.04's AppArmor user-namespace restriction, because test/thumbs.js opens a real Electron window and captures from it.
  • Concurrency cancellation so superseded pushes don't queue stale runs.

It sits on #20's runner rather than on the old && chain deliberately: the chain dies at the first failure, so a red Windows leg would report one broken test instead of ten. The runner reports all of them, which is what makes the leg diagnostic rather than just red.

The Windows leg will be red on day one

That is the finding, not a flaw in the workflow. The ten failures it shows are the ones currently invisible from macOS; each fix for them becomes verifiable by someone other than its author the moment this merges.

npm test was a && chain of 105 npm run links: a fresh npm per file,
strictly serial, dead at the first failure, and a hand-edit in two
places for every new test. On Windows it died at link 15 and the other
ninety never ran.

scripts/test.js discovers test/*.js, runs the files in parallel (they
all use listen(0) and mkdtemp, so they don't collide), prints every
failure rather than the first, and exits non-zero if any failed.
*.test.js files go through node --test, thumbs.js through electron,
everything else through plain node. Arguments filter by filename
substring; --jobs=N caps the workers.

Discovery also picks up doc-defaults.js, a test that existed but had
never been added to the chain. The per-file npm scripts remain for
running one test at a time.
The only workflow was release.yml, which triggers on v* tags and never
runs npm test — nothing between two releases ever executed the suite
anywhere but the machine it was written on. On a fresh Windows checkout
of main, 10 of 110 test files fail and the repository shows no sign of
it, because none of them fail on macOS.

ci.yml runs npm ci && npm test on ubuntu, macos and windows for every
pull request and every push to main, fail-fast off so one platform's
red doesn't hide another's. The Linux leg gets xvfb and lifts Ubuntu
24.04's AppArmor user-namespace restriction, because thumbs.js opens a
real Electron window.

The Windows leg will be red on day one. That is the finding, not a flaw
in the workflow: the ten failures it shows are the ones currently
invisible from macOS.
@cusable cusable closed this Sep 27, 2026
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.

2 participants