ci-templates/.forgejo/workflows/typo3-e2e-test.yaml
Dominik Polakovics 051b997999
All checks were successful
Self Test / test (push) Successful in 13s
feat: split workflows
2026-02-03 14:27:08 +01:00

81 lines
2.1 KiB
YAML

# TYPO3 E2E Test Workflow
#
# Runs Playwright E2E tests against a deployed environment.
# Includes smoke tests and optional visual regression tests.
#
# Usage:
# jobs:
# test:
# needs: switch-stage
# uses: infrastructure/ci-templates/.forgejo/workflows/typo3-e2e-test.yaml@main
# with:
# test_url: https://myproject.cloonar.dev
name: TYPO3 E2E Tests
on:
workflow_call:
inputs:
test_url:
description: 'URL to test against'
required: true
type: string
e2e_path:
description: 'Path to E2E test directory'
required: false
type: string
default: 'tests/e2e'
run_visual_tests:
description: 'Run visual regression tests'
required: false
type: boolean
default: true
visual_tests_continue_on_error:
description: 'Continue if visual tests fail'
required: false
type: boolean
default: true
jobs:
e2e-test:
name: E2E Tests
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.50.0-noble
steps:
- uses: actions/checkout@v4
- name: Install dependencies
working-directory: ${{ inputs.e2e_path }}
run: npm ci
- name: Run smoke tests
working-directory: ${{ inputs.e2e_path }}
env:
TEST_URL: ${{ inputs.test_url }}
run: npx playwright test smoke
- name: Run visual regression tests
if: ${{ inputs.run_visual_tests }}
working-directory: ${{ inputs.e2e_path }}
env:
TEST_URL: ${{ inputs.test_url }}
run: npx playwright test visual
continue-on-error: ${{ inputs.visual_tests_continue_on_error }}
- name: Upload test report
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: ${{ inputs.e2e_path }}/playwright-report/
retention-days: 7
- name: Upload diff screenshots
if: failure()
uses: actions/upload-artifact@v4
with:
name: visual-diff
path: ${{ inputs.e2e_path }}/test-results/
retention-days: 7