Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,20 @@ jobs:
#
# ui / storage-s3 / storage-uploadthing have no test files yet; listed so
# they gate automatically the moment they gain one.
# `--only` because the Build step above already built every package in this
# filter list. Without it turbo re-materialises each test's build
# dependencies from cache — 11 packages' `dist/` rewritten while sibling
# suites are already collecting against them. A test that resolves a
# dependency's entry mid-rewrite fails with `Cannot find module
# '.../dist/chunk-<hash>.mjs'` in a package the change never touched, and
# which package loses the race varies run to run.
#
# Safe because the filter list is a subset of `./packages/*`, which the
# Build step covers. A package added here but not built above would fail
# loudly at collection rather than silently skip.
- name: Test
run: >-
pnpm turbo test
pnpm turbo test --only

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve dependency invalidation when skipping parent tasks

When a PR changes only a workspace dependency, this can replay a stale result for an unchanged dependent package: turbo.jsonc keeps test cached, but pnpm turbo test --only --filter=@nextlyhq/plugin-page-builder --dry-run=json reports dependencies: [] and inputs only from that package, whereas the command without --only includes @nextlyhq/blocks-react#build, @nextlyhq/blocks-engine#build, and the other dependency hashes. The checked-in Turbo 2.9.18 help confirms that --only “does not execute parent tasks.” Because the workflow restores Turbo entries from prior SHAs, a blocks-react change can therefore leave plugin-page-builder's dependency-importing suites cached and unexecuted despite the fresh Build step. Force the selected tests to execute (for example with --force) or otherwise retain dependency content in their cache keys while avoiding artifact replay.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Move the nested build ahead of concurrent tests

When @nextlyhq/blocks-react#test is a cache miss alongside any dependent suite, this still starts a build after the concurrent Test step has begun: its vitest.global-setup.ts unconditionally runs pnpm exec turbo run build --filter=@nextlyhq/blocks-react, including the ^build chain, while an --only dry run shows the selected test tasks have no ordering dependencies. At that point builder and plugin-page-builder suites can already be collecting imports from blocks-react or blocks-engine, and both packages' tsup configurations use clean: true, so the nested build can delete and rewrite the same dist trees that those suites are resolving. This preserves the missing-chunk race the change is intended to remove; the blocks-react build needs to happen before the concurrent test phase, or its global setup must avoid rebuilding when CI has already completed that build.

Useful? React with 👍 / 👎.

--filter=@nextlyhq/blocks-engine
--filter=@nextlyhq/blocks-react
--filter=@nextlyhq/builder
Expand Down
Loading