Skip to content
Open
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions .github/actions/setup-nodejs/safe-chain.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
"minimumPackageAgeExclusions": [
"@n8n/*",
"@n8n_io/*",
"endform",
"endform-darwin-arm64",
"endform-darwin-x86",
"endform-linux-arm64",
"endform-linux-x86",
"endform-win32-arm64",
"endform-win32-x86",
"n8n",
"n8n-containers",
"n8n-core",
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/ci-pull-requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ concurrency:
jobs:
install-and-build:
name: Install & Build
runs-on: ${{ vars.RUNNER_PROVIDER == 'github' && 'ubuntu-latest' || 'blacksmith-4vcpu-ubuntu-2204' }}
runs-on: ${{ (github.repository == 'endformdev/n8n' || vars.RUNNER_PROVIDER == 'github') && 'ubuntu-latest' || 'blacksmith-4vcpu-ubuntu-2204' }}
env:
NODE_OPTIONS: '--max-old-space-size=7168'
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
QA_METRICS_WEBHOOK_URL: ${{ secrets.QA_METRICS_WEBHOOK_URL }}
QA_METRICS_WEBHOOK_USER: ${{ secrets.QA_METRICS_WEBHOOK_USER }}
QA_METRICS_WEBHOOK_PASSWORD: ${{ secrets.QA_METRICS_WEBHOOK_PASSWORD }}
outputs:
ci: ${{ fromJSON(steps.ci-filter.outputs.results).ci == true }}
ci: ${{ github.repository == 'n8n-io/n8n' && fromJSON(steps.ci-filter.outputs.results).ci == true }}
runtime: ${{ fromJSON(steps.ci-filter.outputs.results).runtime == true }}
unit: ${{ fromJSON(steps.ci-filter.outputs.results).unit == true }}
unit: ${{ github.repository == 'n8n-io/n8n' && fromJSON(steps.ci-filter.outputs.results).unit == true }}
e2e: ${{ fromJSON(steps.ci-filter.outputs.results).e2e == true }}
dev_server_smoke: ${{ fromJSON(steps.ci-filter.outputs.results)['dev-server-smoke'] == true }}
dev_server_smoke: ${{ github.repository == 'n8n-io/n8n' && fromJSON(steps.ci-filter.outputs.results)['dev-server-smoke'] == true }}
workflows: ${{ fromJSON(steps.ci-filter.outputs.results).workflows == true }}
workflow_scripts: ${{ fromJSON(steps.ci-filter.outputs.results)['workflow-scripts'] == true }}
db: ${{ fromJSON(steps.ci-filter.outputs.results).db == true }}
Expand Down Expand Up @@ -260,7 +260,7 @@ jobs:
name: Prepare Docker
needs: install-and-build
if: >-
github.repository == 'n8n-io/n8n' &&
(github.repository == 'n8n-io/n8n' || github.repository == 'endformdev/n8n') &&
github.event_name != 'merge_group' &&
(needs.install-and-build.outputs.runtime == 'true'
|| needs.install-and-build.outputs.e2e == 'true'
Expand All @@ -270,6 +270,7 @@ jobs:
uses: ./.github/workflows/prepare-docker-reusable.yml
with:
branch: ${{ needs.install-and-build.outputs.commit_sha }}
runner: ubuntu-latest
secrets: inherit

# Internal-only 1-spec fail-fast sanity check on sqlite.
Expand Down Expand Up @@ -309,7 +310,8 @@ jobs:
with:
branch: ${{ needs.install-and-build.outputs.commit_sha }}
test-mode: docker-artifact
test-command: ${{ github.event.pull_request.head.repo.fork == true && 'pnpm --filter=n8n-playwright test:container:sqlite:e2e --grep-invert=@licensed' || 'pnpm --filter=n8n-playwright test:container:multi-main:e2e' }}
test-command: ${{ github.event.pull_request.head.repo.fork == true && 'pnpm --filter=n8n-playwright exec endform test --organization-id=2G1ZCj7X --project=e2e --grep-invert=@licensed' || 'pnpm --filter=n8n-playwright exec endform test --organization-id=2G1ZCj7X --project=multi-main:e2e' }}
test-runner: endform
workers: '1'
pre-generated-matrix: ${{ needs.install-and-build.outputs.matrix }}
artifact-prefix: e2e
Expand Down Expand Up @@ -363,7 +365,7 @@ jobs:
security-checks:
name: Security Checks
needs: install-and-build
if: needs.install-and-build.outputs.workflows == 'true'
if: needs.install-and-build.outputs.workflows == 'true' && github.repository == 'n8n-io/n8n'
uses: ./.github/workflows/sec-ci-reusable.yml
with:
ref: ${{ needs.install-and-build.outputs.commit_sha }}
Expand Down
20 changes: 19 additions & 1 deletion .github/workflows/test-e2e-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ on:
required: false
default: 'pnpm --filter=n8n-playwright test:local'
type: string
test-runner:
description: 'Test runner: playwright or endform'
required: false
default: 'playwright'
type: string
workers:
description: 'Number of parallel workers'
required: false
Expand Down Expand Up @@ -73,7 +78,7 @@ env:

jobs:
test:
runs-on: ${{ vars.RUNNER_PROVIDER == 'github' && 'ubuntu-latest' || inputs.runner }}
runs-on: ${{ (github.repository == 'endformdev/n8n' || vars.RUNNER_PROVIDER == 'github') && 'ubuntu-latest' || inputs.runner }}
timeout-minutes: ${{ inputs.timeout-minutes }}
permissions:
contents: read
Expand Down Expand Up @@ -149,6 +154,12 @@ jobs:
- name: Run Tests
if: steps.shard-args.outputs.skip != 'true'
run: |
if [ "$TEST_RUNNER" = 'endform' ]; then
# shellcheck disable=SC2086
$TEST_COMMAND $SHARD_ARGS
exit
fi

# --pass-with-no-tests makes Playwright exit 0 when the selected specs
# resolve to zero runnable tests. Covers the impact-map vs current-suite
# skew window: a spec the committed coverage map points at may have been
Expand All @@ -161,10 +172,12 @@ jobs:
env:
# Protect args from template injections
TEST_COMMAND: ${{ inputs.test-command }}
TEST_RUNNER: ${{ inputs.test-runner }}
# Uses pre-distributed specs if orchestration enabled, otherwise falls back to Playwright sharding
WORKERS: ${{ env.PLAYWRIGHT_WORKERS }}
SHARD_ARGS: ${{ steps.shard-args.outputs.args }}
# Args for actual test command runner
ENDFORM_API_KEY: ${{ inputs.test-runner == 'endform' && secrets.ENDFORM_API_KEY || '' }}
CURRENTS_RECORD_KEY: ${{ secrets.CURRENTS_RECORD_KEY }}
QA_METRICS_WEBHOOK_URL: ${{ secrets.QA_METRICS_WEBHOOK_URL }}
QA_METRICS_WEBHOOK_USER: ${{ secrets.QA_METRICS_WEBHOOK_USER }}
Expand All @@ -173,6 +186,11 @@ jobs:
N8N_LICENSE_CERT: ${{ secrets.N8N_LICENSE_CERT }}
N8N_ENCRYPTION_KEY: ${{ secrets.N8N_ENCRYPTION_KEY }}
N8N_TEST_ENV: ${{ inputs.n8n-env }}
# Endform runners are remote and cannot access the job's Docker socket. For the fork's
# SQLite suite, use Playwright's existing webServer and Endform's automatic proxying.
N8N_BASE_URL: ${{ inputs.test-runner == 'endform' && github.repository == 'endformdev/n8n' && 'http://localhost:5680' || '' }}
E2E_TESTS: ${{ inputs.test-runner == 'endform' && github.repository == 'endformdev/n8n' && 'true' || '' }}
RESET_E2E_DB: ${{ inputs.test-runner == 'endform' && github.repository == 'endformdev/n8n' && 'true' || '' }}

- name: Upload Shard Artifacts
if: always()
Expand Down
8 changes: 8 additions & 0 deletions packages/testing/playwright/endform.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/* eslint-disable import-x/no-default-export */
import { defineEndformConfig } from 'endform';

export default defineEndformConfig({
additionalFiles: ['workflows/**/*', 'fixtures/**/*', 'expectations/**/*', 'tests/**/*'],
concurrentTestLimits: [{ scope: 'within-suite-run', limit: 6 }],
environmentVariables: ['N8N_BASE_URL'],
});
1 change: 1 addition & 0 deletions packages/testing/playwright/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
"@types/jsonwebtoken": "catalog:",
"@types/lodash": "catalog:",
"autocannon": "^8.0.0",
"endform": "0.75.3",
"eslint-plugin-playwright": "catalog:e2e",
"flatted": "catalog:",
"generate-schema": "2.6.0",
Expand Down
64 changes: 64 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ minimumReleaseAgeExclude:
- '@ai-sdk/anthropic'
# Security patch (Aikido) newer than the minimumReleaseAge window; allow it in.
- '@xmldom/xmldom'
# Endform releases need immediate validation against the PR E2E suite.
- endform
- 'endform-*'

packages:
- packages/*
Expand Down
Loading