n8n/.github/workflows/test-e2e-docker-pull-reusable.yml
Declan Carroll a31d003c05
ci: Centralize CI Docker image build and distribution (#28798)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 07:18:52 +00:00

50 lines
1.4 KiB
YAML

name: 'Test: E2E Docker Pull'
# This workflow is used to run Playwright tests in a Docker container pulled from the registry
on:
workflow_call:
inputs:
shards:
description: 'Shards for parallel execution'
required: false
default: 1
type: number
image:
description: 'Image to use'
required: false
default: 'n8nio/n8n:nightly'
type: string
workflow_dispatch:
inputs:
shards:
description: 'Shards for parallel execution'
required: false
default: 1
type: number
image:
description: 'Image to use'
required: false
default: 'n8nio/n8n:nightly'
type: string
jobs:
generate-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.gen.outputs.matrix }}
steps:
- id: gen
run: |
MATRIX=$(seq 1 ${{ inputs.shards }} | awk 'BEGIN{printf "["} {printf "%s{\"shard\":%s,\"images\":\"\"}", (NR>1?",":""), $1} END{printf "]"}')
echo "matrix=$MATRIX" >> "$GITHUB_OUTPUT"
build-and-test:
needs: generate-matrix
uses: ./.github/workflows/test-e2e-reusable.yml
with:
test-mode: docker-pull
docker-image: ${{ inputs.image }}
test-command: pnpm --filter=n8n-playwright test:container:standard
pre-generated-matrix: ${{ needs.generate-matrix.outputs.matrix }}
secrets: inherit