n8n/.github/workflows/ci-master.yml
Charlie Kolb 5d74037805
build: Shorten monorepo build and typecheck critical paths
- turbo.json: drop ^typecheck from the typecheck task; all package
  typechecks are self-contained --noEmit runs, so the edge only
  serialized the pipeline
- @n8n/chat: run vite-plugin-dts only on the lib pass; the bundle pass
  regenerated identical declarations (~12s per build)
- @n8n/i18n: widen i18nInstance so vue-i18n stops resolving t()
  overloads against the ~7.7k-key en.json schema; key safety stays at
  the baseText(key: BaseTextKey) boundary
- add scripts/turbo-critical-path.mjs and report the weighted critical
  path from turbo run summaries in PR/master CI job summaries

Cold build 2m31s -> 1m47s; clean typecheck 3m36s -> 2m46s (11-core local).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 14:42:47 +02:00

72 lines
2.2 KiB
YAML

name: 'CI: Master (Build, Test, Lint)'
on:
push:
branches:
- master
paths-ignore:
- packages/@n8n/task-runner-python/**
jobs:
build-github:
name: Build for Github Cache
runs-on: ubuntu-latest
env:
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 }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup and Build
uses: ./.github/actions/setup-nodejs
with:
# The default is build without typechecking, we want both
build-command: pnpm build --summarize
- name: Report build critical path
run: node scripts/turbo-critical-path.mjs >> "$GITHUB_STEP_SUMMARY"
unit-test:
name: Unit tests
uses: ./.github/workflows/test-unit-reusable.yml
strategy:
fail-fast: false
matrix:
node-version: [22.22.3, 24.18.0]
with:
ref: ${{ github.sha }}
nodeVersion: ${{ matrix.node-version }}
collectCoverage: ${{ matrix.node-version == '24.18.0' }}
secrets: inherit
lint:
name: Lint
uses: ./.github/workflows/test-linting-reusable.yml
with:
ref: ${{ github.sha }}
performance:
name: Performance
uses: ./.github/workflows/test-bench-reusable.yml
with:
ref: ${{ github.sha }}
notify-on-failure:
name: Notify Slack on failure
runs-on: ubuntu-latest
needs: [unit-test, lint, performance, build-github]
if: ${{ always() && contains(needs.*.result, 'failure') }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
sparse-checkout: .github/scripts/slack
sparse-checkout-cone-mode: false
- name: Notify Slack
env:
SLACK_TOKEN: ${{ secrets.QBOT_SLACK_TOKEN }}
run: |
node .github/scripts/slack/notify.mjs \
--channel '#alerts-build' \
--text '${{ github.ref_name }} branch (build or test or lint) failed (${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})'