Skip to content

[pull] main from TryGhost:main#1167

Merged
pull[bot] merged 6 commits into
code:mainfrom
TryGhost:main
May 22, 2026
Merged

[pull] main from TryGhost:main#1167
pull[bot] merged 6 commits into
code:mainfrom
TryGhost:main

Conversation

@pull

@pull pull Bot commented May 22, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

9larsons and others added 6 commits May 22, 2026 18:02
`ghost/core`'s unit tests fail intermittently on `main` CI. Two distinct
things were found:

- The previously-skipped `cache-invalidation` test was a genuine
timeout. `testTimeout` was 2000ms — a mocha holdover; under vitest's
per-file isolation the cold-import cost makes that too tight on a loaded
runner.
- The *remaining* failures are not clean timeouts — vitest's
`github-actions` reporter emits no test-level annotation, so the
ghost/core vitest process is exiting abnormally (a worker crash), not
failing a reported test. It could not be reproduced locally (12/12
clean); it is specific to loaded CI runners.

This is interim stabilization, not the root fix:

- **`testTimeout` 2000ms → 5000ms** — clears the timeout-flake class
with no loss of coverage.
- **`retry: 2` in vitest config** — retries a failed test up to twice (3
attempts), absorbing transient test-level failures.
- **CI step retry (up to 3 attempts)** on the "Run unit tests" step —
masks the intermittent worker crash; nx caching means a retry only
re-runs the crashed project.
- **CI console reporter `dot` → `default`** — `dot` emits only dots, so
a crash leaves no clue which file was running; `default` names each
file. `github-actions` annotations are kept for clean per-failure
reporting.
no ref
- use the numeric keyCode path for the admin search shortcut test helper
so keymaster sees the shortcut consistently across Chrome versions
- stub the billing iframe component's message wrapper instead of
mutating cross-origin iframe contentWindow.postMessage
- avoid pipefail/SIGPIPE when selecting the first Docker image tag from
multiline image tag input

## Context
This came out of investigating failures on
#28047 while testing Blacksmith
runners. The changes are not Blacksmith-specific; they harden tests and
CI shell behavior that can vary by browser/runtime.
no ref
- verify the application route still registers Ctrl/Cmd+K to open the
search modal
- open the search modal through the registered route action for the rest
of the search behavior coverage
- avoids depending on Chrome-version-specific behavior in synthetic
global keyboard events

## Context
This was found while validating Blacksmith runners in
#28047. Blacksmith's Admin tests
lane uses system Chrome 144, where Ember's synthetic global keydown did
not reliably exercise keymaster and all search modal tests failed before
reaching the behavior under test.

The change is intentionally not Blacksmith-specific. This PR separates
the browser-sensitive test hardening from the runner migration and lets
it validate independently on the normal GitHub Actions path.
no ref

`test/unit/frontend/helpers/meta-title.test.js` — the `with meta_title`
block stubs `settingsCache.get` in its first test and its remaining
tests rely on that stub staying in place, but the stub is never
restored.
Updated portal strings for gift subs and retention, zh and zh-Hant
no ref

The ghost/core unit suite ran under vitest's default `isolate: true` — a
fresh module registry per test file, cold-importing Ghost's heavy server
modules ~550 times per run. It now runs under `isolate: false` (one
shared registry per worker, the model mocha always used): **~73s → ~7s
locally.**
@pull pull Bot locked and limited conversation to collaborators May 22, 2026
@pull pull Bot added the ⤵️ pull label May 22, 2026
@pull pull Bot merged commit b2486ef into code:main May 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants