Skip to content
Closed
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
54 changes: 54 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: E2E Tests

on:
push:
branches:
- master
- 'feature/**'
pull_request:

jobs:
e2e:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install root deps
run: yarn install

- name: Build join-flow bundle (E2E mode)
working-directory: packages/join-flow
run: REACT_APP_USE_TEST_DATA=true npm run build

- name: Install E2E deps
working-directory: packages/join-e2e
run: npm ci

- name: Install Playwright browsers
working-directory: packages/join-e2e
run: npx playwright install --with-deps chromium

- name: Start wp-env
working-directory: packages/join-e2e
run: npx wp-env start

- name: Seed WordPress test environment
working-directory: packages/join-e2e
run: |
npx wp-env run tests-cli wp eval-file /var/www/html/wp-content/e2e-scripts/setup.php
npx wp-env run tests-cli wp rewrite flush --hard

- name: Run E2E tests
working-directory: packages/join-e2e
run: npm test -- --reporter=list,html

- uses: actions/upload-artifact@v4
if: failure()
with:
name: playwright-report
path: packages/join-e2e/playwright-report/
12 changes: 12 additions & 0 deletions packages/join-e2e/.wp-env.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"core": "WordPress/WordPress#6.5",
"plugins": ["../../packages/join-block"],
"mappings": {
"wp-content/e2e-scripts": "../../packages/join-e2e/scripts"
},
"config": {
"WP_DEBUG": true,
"WP_DEBUG_LOG": true,
"SCRIPT_DEBUG": true
}
}
Loading
Loading