Skip to content

GPHDRUI-427: Fix CI test failures and modernize GitHub workflows - #165

Merged
thomashilz merged 1 commit into
InterNetX:masterfrom
thomashilz:GPHDRUI-427
Jul 23, 2026
Merged

GPHDRUI-427: Fix CI test failures and modernize GitHub workflows#165
thomashilz merged 1 commit into
InterNetX:masterfrom
thomashilz:GPHDRUI-427

Conversation

@thomashilz

Copy link
Copy Markdown
Collaborator

The test suite failed on CI with "ReferenceError: FormData is not defined" because the pipeline ran on an outdated Node that lacks the global FormData/Blob (added in Node 18+). The old workflow bundled its own Node via the CultureHQ/actions-yarn wrapper and silently ignored the matrix node-version.

Test fixes (Node-version agnostic):

  • ContactDocumentService mock and integration tests: use the form-data package instead of the global FormData, and Buffer instead of Blob for the payload, so the tests run on any Node version
  • add "form-data": "^4.0.0" as an explicit devDependency (previously only a transitive axios dependency) and update yarn.lock

CI workflow modernization:

  • main.yml: replace the outdated CultureHQ/actions-yarn wrapper with actions/setup-node@v4 running Node 20.x + yarn cache; bump actions/checkout to v4; install via yarn install --frozen-lockfile; run the integration suite (yarn test:integration) as a separate step after the mock suite
  • publish.yml: same modernization (checkout@v4, setup-node@v4 Node 20.x, frozen-lockfile install); keep the tag-from-version and NPM publish steps unchanged
  • create-release.yml: bump actions/checkout to v4

The test suite failed on CI with "ReferenceError: FormData is not
defined" because the pipeline ran on an outdated Node that lacks the
global FormData/Blob (added in Node 18+). The old workflow bundled its
own Node via the CultureHQ/actions-yarn wrapper and silently ignored the
matrix node-version.

Test fixes (Node-version agnostic):
- ContactDocumentService mock and integration tests: use the `form-data`
  package instead of the global FormData, and Buffer instead of Blob for
  the payload, so the tests run on any Node version
- add "form-data": "^4.0.0" as an explicit devDependency (previously only
  a transitive axios dependency) and update yarn.lock

CI workflow modernization:
- main.yml: replace the outdated CultureHQ/actions-yarn wrapper with
  actions/setup-node@v4 running Node 20.x + yarn cache; bump
  actions/checkout to v4; install via `yarn install --frozen-lockfile`;
  run the integration suite (yarn test:integration) as a separate step
  after the mock suite
- publish.yml: same modernization (checkout@v4, setup-node@v4 Node 20.x,
  frozen-lockfile install); keep the tag-from-version and NPM publish
  steps unchanged
- create-release.yml: bump actions/checkout to v4
@thomashilz
thomashilz merged commit 8047010 into InterNetX:master Jul 23, 2026
1 check passed
@thomashilz
thomashilz deleted the GPHDRUI-427 branch July 23, 2026 15:03
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