Skip to content

Fix CI test order and release flow - #126

Merged
julrich merged 2 commits into
mainfrom
fix/ci-test-order-and-release-flow
Oct 6, 2026
Merged

julrich merged 2 commits into
mainfrom
fix/ci-test-order-and-release-flow

Conversation

@julrich

@julrich julrich commented Oct 6, 2026

Copy link
Copy Markdown
Member

No description provided.

`pnpm -r run build` scheduled `storyblok-n8n`'s build alongside the design
system's, and the node's `sync-schemas` reads the design system's `dist`
(through `require.resolve("@kickstartds/design-system")`). In CI the two ran
concurrently, so the sync found nothing:

  ⚠ page: no dereffed schema found (checked website + design system)
  Sync complete: 0 synced, 5 skipped out of 5

leaving the node with an empty schema registry, so `pnpm -r run test` then died
with `Unknown content type: "page". Available:` in every n8n suite.
`storyblok-mcp` reads the same dist and builds fine because it *does* declare
the dependency, which is what orders its build after the design system's.

Declare `@kickstartds/design-system` (workspace:*) as a devDependency of the
n8n node, matching the mcp package, and update the lockfile.

Verified against the CI conditions: with the design system `dist` removed and
`pnpm install --frozen-lockfile` re-run (so the injected copies carry no dist,
exactly like CI), `pnpm -r run build` now builds the design system first,
`storyblok-n8n` reports `Sync complete: 5 synced, 0 skipped out of 5`, and
`pnpm --filter n8n-nodes-storyblok-kickstartds run test` passes 2 suites / 20
tests. The frozen install also confirms the committed lockfile is consistent.
Every Release run failed with

  Validation Failed: A pull request already exists for kickstartDS:changeset-release/main

even though the action's PR (#91) is open. The
action finds its PR with `pulls.list({ head: "<owner>:<branch>" })` (its own
`core.info` logged `Existing pull requests: []`), and that filter currently
returns nothing for existing PRs — reproduced here for a bot-authored, a
human-authored and a cross-repo PR, and on an unrelated repository, while the
bare branch form is ignored by the API altogether (it returns every open PR).
Upstream's `main` still uses the same call, so a newer action version would not
help.

Do the versioning in the workflow instead and let `gh` handle the PR: `gh`
resolves the same PR through GraphQL (verified: `gh pr list --head
changeset-release/main --state open` → 91), and `--repo "$GITHUB_REPOSITORY"`
keeps the lookup unambiguous. The step commits the version bump to
`changeset-release/main`, force-pushes it, and creates or updates the PR with a
body listing the bumped packages.

Publishing is dropped: the action's publish half, its `NPM_TOKEN` wiring and
`setup-node`'s registry configuration are gone, so the workflow only maintains
the version PR and needs no npm credentials. `pnpm publish-packages` remains
available for manual use.

Verified: YAML parses, the step script passes `bash -n`, and the
pending-changeset count (18), the body generator and the PR lookup were run
directly. The push-to-main behaviour itself can only be proven by a run.
@julrich
julrich merged commit 7a4c0f0 into main Oct 6, 2026
1 check failed
@julrich
julrich deleted the fix/ci-test-order-and-release-flow branch October 6, 2026 15:21
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