-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (49 loc) · 1.57 KB
/
e2e.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: E2E Tests
on:
push:
branches-ignore:
- 'main-built'
jobs:
e2e:
timeout-minutes: 60
runs-on: ubuntu-latest
strategy:
fail-fast: false
env:
WP_BASE_URL: 'http://localhost:8888'
WP_USERNAME: 'admin'
WP_PASSWORD: 'password'
WP_AUTH_STORAGE: '.auth/wordpress.json'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.11'
cache: 'yarn'
- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
- name: Setup composer
uses: php-actions/composer@v6
with:
php_version: '8.3'
dev: no
- name: Install packages
run: yarn install --immutable
- name: Build packages
run: yarn build
- name: Playwright install
run: yarn playwright install chromium
- name: Start wp-env
run: yarn wp-env
- name: Run Playwright tests
run: npx playwright test
- name: Upload artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30