mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 01:26:44 +00:00
test: Add performance test CI nightly (#19088)
This commit is contained in:
@@ -33,9 +33,9 @@ runs:
|
||||
- name: Configure Turborepo Cache
|
||||
uses: useblacksmith/caching-for-turbo@bafb57e7ebdbf1185762286ec94d24648cd3938a # v1
|
||||
|
||||
- name: Setup Blacksmith Buildx for Docker Cache
|
||||
- name: Setup Docker Builder for Docker Cache
|
||||
if: ${{ inputs.enable-docker-cache == 'true' }}
|
||||
uses: useblacksmith/build-push-action@574eb0ee0b59c6a687ace24192f0727dfb65d6d7 # v1.2.0
|
||||
uses: useblacksmith/setup-docker-builder@0b434dfbb431f4e3a2bcee7a773a56bd363184c5 # v1
|
||||
|
||||
- name: Build Project
|
||||
run: ${{ inputs.build-command }}
|
||||
|
||||
@@ -10,4 +10,5 @@ jobs:
|
||||
uses: ./.github/workflows/playwright-test-reusable.yml
|
||||
with:
|
||||
test-mode: docker-build
|
||||
test-command: pnpm --filter=n8n-playwright test:container:standard
|
||||
secrets: inherit
|
||||
|
||||
@@ -34,4 +34,5 @@ jobs:
|
||||
test-mode: docker-pull
|
||||
shards: ${{ inputs.shards }}
|
||||
docker-image: ${{ inputs.image }}
|
||||
test-command: pnpm --filter=n8n-playwright test:container:standard
|
||||
secrets: inherit
|
||||
|
||||
19
.github/workflows/playwright-test-performance.yml
vendored
Normal file
19
.github/workflows/playwright-test-performance.yml
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
name: Run Playwright Performance Tests
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 0 * * *' # Runs daily at midnight
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/playwright-test-performance.yml'
|
||||
|
||||
jobs:
|
||||
build-and-test-performance:
|
||||
uses: ./.github/workflows/playwright-test-reusable.yml
|
||||
with:
|
||||
test-mode: docker-build
|
||||
test-command: pnpm --filter=n8n-playwright test:performance
|
||||
shards: '[1]'
|
||||
secrets: inherit
|
||||
30
.github/workflows/playwright-test-reusable.yml
vendored
30
.github/workflows/playwright-test-reusable.yml
vendored
@@ -8,6 +8,11 @@ on:
|
||||
required: false
|
||||
default: 'local'
|
||||
type: string
|
||||
test-command:
|
||||
description: 'Test command to run'
|
||||
required: false
|
||||
default: 'pnpm --filter=n8n-playwright test:local'
|
||||
type: string
|
||||
shards:
|
||||
description: 'Shards for parallel execution'
|
||||
required: false
|
||||
@@ -22,6 +27,12 @@ on:
|
||||
secrets:
|
||||
CURRENTS_RECORD_KEY:
|
||||
required: true
|
||||
QA_PERFORMANCE_METRICS_WEBHOOK_URL:
|
||||
required: true
|
||||
QA_PERFORMANCE_METRICS_WEBHOOK_USER:
|
||||
required: true
|
||||
QA_PERFORMANCE_METRICS_WEBHOOK_PASSWORD:
|
||||
required: true
|
||||
|
||||
env:
|
||||
PLAYWRIGHT_BROWSERS_PATH: packages/testing/playwright/ms-playwright-cache
|
||||
@@ -53,25 +64,18 @@ jobs:
|
||||
env:
|
||||
INCLUDE_TEST_CONTROLLER: ${{ inputs.test-mode == 'docker-build' && 'true' || '' }}
|
||||
|
||||
- name: Install Browsers (Docker Build)
|
||||
- name: Install Browsers
|
||||
if: inputs.test-mode == 'docker-build'
|
||||
run: pnpm turbo install-browsers:ci
|
||||
|
||||
- name: Run Tests (Local)
|
||||
if: inputs.test-mode == 'local'
|
||||
- name: Run Tests
|
||||
run: |
|
||||
pnpm --filter=n8n-playwright test:local \
|
||||
--shard=${{ matrix.shard }}/${{ strategy.job-total }} \
|
||||
--workers=${{ env.PLAYWRIGHT_WORKERS }}
|
||||
env:
|
||||
CURRENTS_RECORD_KEY: ${{ secrets.CURRENTS_RECORD_KEY }}
|
||||
|
||||
- name: Run Tests (Docker)
|
||||
if: inputs.test-mode != 'local'
|
||||
run: |
|
||||
pnpm --filter=n8n-playwright test:container:standard \
|
||||
${{ inputs.test-command }} \
|
||||
--shard=${{ matrix.shard }}/${{ strategy.job-total }} \
|
||||
--workers=${{ env.PLAYWRIGHT_WORKERS }}
|
||||
env:
|
||||
N8N_DOCKER_IMAGE: ${{ inputs.test-mode == 'docker-build' && 'n8nio/n8n:local' || inputs.docker-image }}
|
||||
CURRENTS_RECORD_KEY: ${{ secrets.CURRENTS_RECORD_KEY }}
|
||||
QA_PERFORMANCE_METRICS_WEBHOOK_URL: ${{ secrets.QA_PERFORMANCE_METRICS_WEBHOOK_URL }}
|
||||
QA_PERFORMANCE_METRICS_WEBHOOK_USER: ${{ secrets.QA_PERFORMANCE_METRICS_WEBHOOK_USER }}
|
||||
QA_PERFORMANCE_METRICS_WEBHOOK_PASSWORD: ${{ secrets.QA_PERFORMANCE_METRICS_WEBHOOK_PASSWORD }}
|
||||
|
||||
Reference in New Issue
Block a user