Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: E2E

on:
pull_request:
push:
branches: [master]

concurrency:
group: e2e-${{ github.ref }}
cancel-in-progress: true

jobs:
e2e:
name: Playwright + wp-env
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Install npm dependencies
# --ignore-scripts skips the legacy node-sass build pulled in by
# the existing gulp toolchain (not needed for E2E tests).
run: npm ci --ignore-scripts

- name: Install Playwright browser (chromium)
run: npx playwright install --with-deps chromium

- name: Start wp-env
run: npx wp-env start

- name: Run E2E tests
run: npm run test:e2e

- name: Upload Playwright report
if: failure()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: playwright-report/
retention-days: 7

- name: Stop wp-env
if: always()
run: npx wp-env stop
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,9 @@ lerna-debug.log*
# Performant Translations
*.l10n.php
*.mo.php

# E2E test artifacts
test-results/
playwright-report/
.wp-env/

15 changes: 15 additions & 0 deletions .wp-env.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"core": "WordPress/WordPress#6.6",
"phpVersion": "8.1",
"port": 8989,
"testsPort": 8990,
"plugins": [],
"mappings": {
"wp-content/plugins/core-standards": "."
},
"config": {
"WP_DEBUG": true,
"WP_DEBUG_LOG": true,
"WP_DEBUG_DISPLAY": false
}
}
Loading
Loading