ci: Adjust memory usage and build/test steps (#17743)

This commit is contained in:
shortstacked
2025-07-28 13:31:43 +01:00
committed by GitHub
parent 23850a442d
commit 53d272c251
8 changed files with 26 additions and 10 deletions

View File

@@ -22,11 +22,22 @@ concurrency:
cancel-in-progress: false cancel-in-progress: false
env: env:
NODE_OPTIONS: '--max-old-space-size=4096' NODE_OPTIONS: '--max-old-space-size=3072'
jobs: jobs:
build:
name: Install & Build
runs-on: blacksmith-2vcpu-ubuntu-2204
if: github.event_name != 'pull_request_review' || startsWith(github.event.pull_request.base.ref, 'release/')
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup and Build
uses: n8n-io/n8n/.github/actions/setup-nodejs-blacksmith@f5fbbbe0a28a886451c886cac6b49192a39b0eea # v1.104.1
sqlite-pooled: sqlite-pooled:
name: SQLite Pooled name: SQLite Pooled
needs: build
runs-on: blacksmith-2vcpu-ubuntu-2204 runs-on: blacksmith-2vcpu-ubuntu-2204
timeout-minutes: 20 timeout-minutes: 20
env: env:
@@ -44,6 +55,7 @@ jobs:
mariadb: mariadb:
name: MariaDB name: MariaDB
needs: build
runs-on: blacksmith-2vcpu-ubuntu-2204 runs-on: blacksmith-2vcpu-ubuntu-2204
timeout-minutes: 20 timeout-minutes: 20
env: env:
@@ -67,6 +79,7 @@ jobs:
mysql: mysql:
name: MySQL (${{ matrix.service-name }}) name: MySQL (${{ matrix.service-name }})
needs: build
runs-on: blacksmith-2vcpu-ubuntu-2204 runs-on: blacksmith-2vcpu-ubuntu-2204
timeout-minutes: 20 timeout-minutes: 20
strategy: strategy:
@@ -93,6 +106,7 @@ jobs:
postgres: postgres:
name: Postgres name: Postgres
needs: build
runs-on: blacksmith-2vcpu-ubuntu-2204 runs-on: blacksmith-2vcpu-ubuntu-2204
timeout-minutes: 20 timeout-minutes: 20
env: env:

View File

@@ -11,7 +11,7 @@ jobs:
name: Install & Build name: Install & Build
runs-on: blacksmith-2vcpu-ubuntu-2204 runs-on: blacksmith-2vcpu-ubuntu-2204
env: env:
NODE_OPTIONS: '--max-old-space-size=4096' NODE_OPTIONS: '--max-old-space-size=3072'
outputs: outputs:
frontend_changed: ${{ steps.paths-filter.outputs.frontend == 'true' }} frontend_changed: ${{ steps.paths-filter.outputs.frontend == 'true' }}
steps: steps:

View File

@@ -7,7 +7,7 @@
name: 'Docker: Build and Push' name: 'Docker: Build and Push'
env: env:
NODE_OPTIONS: '--max-old-space-size=8192' NODE_OPTIONS: '--max-old-space-size=7168'
on: on:
schedule: schedule:

View File

@@ -45,7 +45,7 @@ on:
required: true required: true
env: env:
NODE_OPTIONS: --max-old-space-size=4096 NODE_OPTIONS: --max-old-space-size=3072
jobs: jobs:
testing: testing:

View File

@@ -15,7 +15,7 @@ on:
default: 22.x default: 22.x
env: env:
NODE_OPTIONS: --max-old-space-size=8192 NODE_OPTIONS: --max-old-space-size=7168
jobs: jobs:
lint: lint:

View File

@@ -25,7 +25,7 @@ on:
env: env:
PLAYWRIGHT_BROWSERS_PATH: packages/testing/playwright/ms-playwright-cache PLAYWRIGHT_BROWSERS_PATH: packages/testing/playwright/ms-playwright-cache
NODE_OPTIONS: --max-old-space-size=4096 NODE_OPTIONS: --max-old-space-size=3072
# Disable Ryuk to avoid issues with Docker since it needs privileged access, containers are cleaned on teardown anyway # Disable Ryuk to avoid issues with Docker since it needs privileged access, containers are cleaned on teardown anyway
TESTCONTAINERS_RYUK_DISABLED: true TESTCONTAINERS_RYUK_DISABLED: true

View File

@@ -29,7 +29,7 @@ on:
required: false required: false
env: env:
NODE_OPTIONS: --max-old-space-size=4096 NODE_OPTIONS: --max-old-space-size=3072
jobs: jobs:
build_and_test: build_and_test:

View File

@@ -23,7 +23,7 @@ on:
required: false required: false
env: env:
NODE_OPTIONS: --max-old-space-size=8192 NODE_OPTIONS: --max-old-space-size=7168
jobs: jobs:
unit-test: unit-test:
@@ -36,12 +36,14 @@ jobs:
with: with:
ref: ${{ inputs.ref }} ref: ${{ inputs.ref }}
- name: Build and Test - name: Build
uses: n8n-io/n8n/.github/actions/setup-nodejs-blacksmith@f5fbbbe0a28a886451c886cac6b49192a39b0eea # v1.104.1 uses: n8n-io/n8n/.github/actions/setup-nodejs-blacksmith@f5fbbbe0a28a886451c886cac6b49192a39b0eea # v1.104.1
with: with:
build-command: pnpm test:ci
node-version: ${{ inputs.nodeVersion }} node-version: ${{ inputs.nodeVersion }}
- name: Test
run: pnpm test:ci
- name: Upload test results to Codecov - name: Upload test results to Codecov
if: ${{ !cancelled() }} if: ${{ !cancelled() }}
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1 uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1