Skip to content

chore: Update zod to 3.22.3 [SECURITY] #46034

chore: Update zod to 3.22.3 [SECURITY]

chore: Update zod to 3.22.3 [SECURITY] #46034

name: Build, unit test and lint branch
on:
pull_request:
branches:
- '**'
- '!release/*'
concurrency:
group: ci-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
COVERAGE_ENABLED: 'true' # Set globally for all jobs - ensures Turbo cache consistency
jobs:
install-and-build:
name: Install & Build
runs-on: blacksmith-2vcpu-ubuntu-2204
env:
NODE_OPTIONS: '--max-old-space-size=6144'
outputs:
frontend_changed: ${{ steps.paths-filter.outputs.frontend == 'true' }}
non_python_changed: ${{ steps.paths-filter.outputs.non-python == 'true' }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- name: Check for frontend changes
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: paths-filter
with:
filters: |
frontend:
- packages/frontend/**
- packages/@n8n/design-system/**
- packages/@n8n/chat/**
- packages/@n8n/codemirror-lang/**
- .bundlemonrc.json
- .github/workflows/ci-pull-requests.yml
non-python:
- '**'
- '!packages/@n8n/task-runner-python/**'
- name: Setup and Build
if: steps.paths-filter.outputs.non-python == 'true'
uses: n8n-io/n8n/.github/actions/setup-nodejs-blacksmith@f5fbbbe0a28a886451c886cac6b49192a39b0eea # v1.104.1
- name: Run format check
if: steps.paths-filter.outputs.non-python == 'true'
run: pnpm format:check
- name: Upload Frontend Build Artifacts
if: steps.paths-filter.outputs.frontend == 'true'
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: editor-ui-dist
path: packages/frontend/editor-ui/dist/
retention-days: 1
bundle-size-check:
name: Bundle Size Check
needs: install-and-build
if: needs.install-and-build.outputs.frontend_changed == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- name: Setup pnpm CLI
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '22.x'
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Download Frontend Build Artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: editor-ui-dist
path: packages/frontend/editor-ui/dist/
- name: BundleMon
uses: lironer/bundlemon-action@cadbdd58f86faf1900725ef69d455444124b3748 # v1.3.0
unit-test:
name: Unit tests
if: needs.install-and-build.outputs.non_python_changed == 'true'
uses: ./.github/workflows/units-tests-reusable.yml
needs: install-and-build
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge
collectCoverage: true
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
typecheck:
name: Typecheck
if: needs.install-and-build.outputs.non_python_changed == 'true'
runs-on: blacksmith-4vcpu-ubuntu-2204
needs: install-and-build
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- name: Setup Node.js
uses: n8n-io/n8n/.github/actions/setup-nodejs-blacksmith@f5fbbbe0a28a886451c886cac6b49192a39b0eea # v1.104.1
with:
build-command: pnpm typecheck
lint:
name: Lint
if: needs.install-and-build.outputs.non_python_changed == 'true'
uses: ./.github/workflows/linting-reusable.yml
needs: install-and-build
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge
e2e-test:
name: E2E Tests
needs: [install-and-build, unit-test, typecheck, lint]
if: |
always() &&
needs.install-and-build.result == 'success' &&
needs.unit-test.result != 'failure' &&
needs.typecheck.result != 'failure' &&
needs.lint.result != 'failure'
uses: ./.github/workflows/playwright-test-reusable.yml
secrets: inherit
e2e-checks:
name: E2E - Checks
runs-on: ubuntu-latest
needs: [e2e-test]
if: always()
steps:
- name: Fail if E2E tests failed
if: needs.e2e-test.result == 'failure'
run: exit 1