-
Notifications
You must be signed in to change notification settings - Fork 30
43 lines (37 loc) · 1.14 KB
/
e2e-tests.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
name: E2E Tests
on:
push:
branches:
- main
jobs:
playwright:
name: Playwright Tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log debug information
run: |
npm --version
node --version
git --version
php --version
composer --version
- name: Install NodeJS
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
# Enable built-in functionality for caching and restoring dependencies, which is disabled by default.
# The actions/setup-node uses actions/cache under the hood.
# https://github.com/actions/setup-node#caching-global-packages-data
cache: 'npm'
- name: NPM install
run: npm ci --legacy-peer-deps
- name: Playwright install
run: npx playwright install --with-deps
- name: Run Playwright
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WP_ADMIN_PASSWORD: ${{ secrets.WP_ADMIN_PASSWORD }}
run: npm run test:e2e
if: ${{ success() || failure() }}