mirror of
https://github.com/n8n-io/n8n.git
synced 2026-10-16 21:19:43 +02:00
ci: Split the packages/modules test filters into frontend and backend (no-changelog) (#38121)
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
9095e9a986
commit
e510f0f33c
4
.github/workflows/test-unit-reusable.yml
vendored
4
.github/workflows/test-unit-reusable.yml
vendored
|
|
@ -73,7 +73,7 @@ jobs:
|
|||
# @n8n/vitest-config/node), peak forks ≈ 2 × 50% ≈ the core count, instead
|
||||
# of ~10 concurrent suites each spawning a core-sized pool and pegging CPU.
|
||||
- name: Test Unit (backend, except cli and nodes-base)
|
||||
run: pnpm turbo test:unit --continue --concurrency=2 --filter='!./packages/frontend/**' --filter='!./packages/modules/**' --filter='!n8n' --filter='!n8n-nodes-base' --summarize
|
||||
run: pnpm turbo test:unit --continue --concurrency=2 --filter='!./packages/frontend/**' --filter='!./packages/modules/*/frontend' --filter='!n8n' --filter='!n8n-nodes-base' --summarize
|
||||
|
||||
- name: Test Unit (cli, scoped)
|
||||
if: ${{ !cancelled() }}
|
||||
|
|
@ -133,7 +133,7 @@ jobs:
|
|||
# run serially to avoid cross-package interference. Unit jobs above
|
||||
# don't need this because they isolate per-process.
|
||||
- name: Test Integration (backend, except cli)
|
||||
run: pnpm turbo test:integration --continue --concurrency=1 --filter='!./packages/frontend/**' --filter='!./packages/modules/**' --filter='!n8n' --summarize
|
||||
run: pnpm turbo test:integration --continue --concurrency=1 --filter='!./packages/frontend/**' --filter='!./packages/modules/*/frontend' --filter='!n8n' --summarize
|
||||
|
||||
- name: Test Integration (cli, scoped)
|
||||
if: ${{ !cancelled() }}
|
||||
|
|
|
|||
12
package.json
12
package.json
|
|
@ -71,12 +71,12 @@
|
|||
"mutate:diff": "node scripts/mutation-health/mutate.mjs --diff",
|
||||
"test": "turbo run test",
|
||||
"test:ci": "turbo run test --continue --concurrency=1",
|
||||
"test:ci:frontend": "turbo run test --continue --filter='./packages/frontend/**' --filter='./packages/modules/**'",
|
||||
"test:ci:frontend:changed": "turbo run test:changed --continue --filter='./packages/frontend/**' --filter='./packages/modules/**'",
|
||||
"test:ci:backend": "turbo run test --continue --concurrency=1 --filter='!./packages/frontend/**' --filter='!./packages/modules/**'",
|
||||
"test:ci:backend:unit": "turbo run test:unit --continue --filter='!./packages/frontend/**' --filter='!./packages/modules/**'",
|
||||
"test:ci:backend:integration": "turbo run test:integration --continue --concurrency=1 --filter='!./packages/frontend/**' --filter='!./packages/modules/**'",
|
||||
"test:ci:backend:integration:changed": "turbo run test:integration:changed --continue --concurrency=1 --filter='!./packages/frontend/**' --filter='!./packages/modules/**'",
|
||||
"test:ci:frontend": "turbo run test --continue --filter='./packages/frontend/**' --filter='./packages/modules/*/frontend'",
|
||||
"test:ci:frontend:changed": "turbo run test:changed --continue --filter='./packages/frontend/**' --filter='./packages/modules/*/frontend'",
|
||||
"test:ci:backend": "turbo run test --continue --concurrency=1 --filter='!./packages/frontend/**' --filter='!./packages/modules/*/frontend'",
|
||||
"test:ci:backend:unit": "turbo run test:unit --continue --filter='!./packages/frontend/**' --filter='!./packages/modules/*/frontend'",
|
||||
"test:ci:backend:integration": "turbo run test:integration --continue --concurrency=1 --filter='!./packages/frontend/**' --filter='!./packages/modules/*/frontend'",
|
||||
"test:ci:backend:integration:changed": "turbo run test:integration:changed --continue --concurrency=1 --filter='!./packages/frontend/**' --filter='!./packages/modules/*/frontend'",
|
||||
"test:affected": "turbo run test --affected --concurrency=1",
|
||||
"db:schema:docs": "turbo run build --filter=@n8n/db && pnpm --filter=@n8n/db schema:docs",
|
||||
"db:schema:check": "turbo run build --filter=@n8n/db && pnpm --filter=@n8n/db schema:check",
|
||||
|
|
|
|||
|
|
@ -8,6 +8,10 @@ through Vite aliases.
|
|||
modules under `packages/cli/src/modules/<name>`. The extra nesting level is what lets both halves of
|
||||
a module sit together later.
|
||||
|
||||
The directory is empty until the first module lands, and tracked in the meantime because turbo
|
||||
rejects a `--filter` whose directory does not exist. The root `test:ci:*` scripts and the two
|
||||
backend jobs in `.github/workflows/test-unit-reusable.yml` all name `packages/modules/**`.
|
||||
`packages/modules` itself stays tracked even when it holds nothing: turbo rejects a `--filter`
|
||||
whose directory does not exist.
|
||||
|
||||
CI splits the two halves by path. The frontend jobs select `packages/modules/*/frontend`. The backend
|
||||
jobs exclude that same path instead of all of `packages/modules`, so a `<name>/backend` package gets
|
||||
backend CI on the day it appears. Both filters live in the root `test:ci:*` scripts and in the two
|
||||
backend jobs in `.github/workflows/test-unit-reusable.yml`.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user