Skip to content

Commit 157ea08

Browse files
authored
E2E Testing: Setting up the environment. (#91)
* Add beginning framework for e2e tests.
1 parent 694fcc6 commit 157ea08

File tree

6 files changed

+2290
-18
lines changed

6 files changed

+2290
-18
lines changed

.github/workflows/e2e.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: E2E Tests
2+
3+
on:
4+
pull_request:
5+
branches: [trunk]
6+
7+
jobs:
8+
test:
9+
name: Playwright e2e Tests
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Setup Node.js
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: "20.15.1"
18+
cache: "npm"
19+
20+
- name: Install dependencies
21+
run: |
22+
npm ci
23+
composer install --prefer-dist --no-progress
24+
25+
- name: Install wp-env
26+
run: npm install -g @wordpress/env
27+
28+
- name: Start wp-env
29+
run: wp-env start
30+
31+
- name: Install Playwright browsers
32+
run: npx playwright install --with-deps chromium
33+
34+
- name: Run e2e tests
35+
run: npm run test:e2e
36+
37+
- name: Stop wp-env
38+
if: always()
39+
run: wp-env stop

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,10 @@ assets/build/**/*.php
5050

5151
# PHPUnit result cache
5252
.phpunit.result.cache
53+
54+
# Playwright
55+
/test-results/
56+
/playwright-report/
57+
/blob-report/
58+
/playwright/.cache/
59+
/artifacts/

0 commit comments

Comments
 (0)