Skip to content

Commit 8c5e239

Browse files
Suppressed Ghost logging noise in CI unit tests (#26758)
no issue Failing unit tests in CI were difficult to reason about because the output was often truncated, hiding the actual failures. Logs from Ghost are also extremely noisy because we're unit testing expected failure cases that were then logging the failures which aren't useful to know about. - Added `logging__level=fatal` env var to the CI unit test step to suppress Ghost's noisy `info`-level logging output - The test config had no logging override, so Ghost defaulted to `info` level, flooding CI output and causing truncation that hid real test failures - Scoped to only the unit test step in CI — no change to local development or other test suites
1 parent e66644b commit 8c5e239

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,7 @@ jobs:
454454
FORCE_COLOR: 0
455455
GHOST_UNIT_TEST_VARIANT: ci
456456
NX_SKIP_LOG_GROUPING: true
457+
logging__level: fatal
457458

458459
- uses: actions/upload-artifact@v4
459460
if: matrix.node == env.NODE_VERSION

ghost/core/test/unit/shared/config/loader.test.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ describe('Config Loader', function () {
2929
// we manually call `loadConf` in the tests and we need to ensure that the minimum
3030
// required config properties are available
3131
process.env.paths__contentPath = 'content/';
32+
// Remove any nconf-style env vars that could interfere with
33+
// config hierarchy assertions (e.g. logging__level set by CI)
34+
delete process.env.logging__level;
3235
});
3336

3437
afterEach(function () {

0 commit comments

Comments
 (0)