This commit is contained in:
parent
cba97991f3
commit
051b997999
8 changed files with 359 additions and 792 deletions
81
.forgejo/workflows/typo3-e2e-test.yaml
Normal file
81
.forgejo/workflows/typo3-e2e-test.yaml
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
# 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue