-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (52 loc) · 1.67 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: E2E Tests
on:
workflow_dispatch:
pull_request:
# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
# The concurrency group contains the workflow name and the branch name for pull requests
# or the commit hash for any other events.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
jobs:
e2e-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
# matrix:
# node: ['14']
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: npm
- name: Install dependencies
run: npm ci
- name: Build plugin
run: |
npm run build
- name: Install Playwright dependencies
run: |
npx playwright install chromium firefox webkit --with-deps
- name: Starting the WordPress Environment
run: |
npm run env:start
- name: Running the tests
env:
WP_AUTH_STORAGE: .auth/wordpress.json
WP_BASE_URL: http://localhost:8888
WP_USERNAME: admin
WP_PASSWORD: password
run: |
npm run test:e2e
- name: Retain failed test results
uses: actions/upload-artifact@v3
if: failure()
with:
name: test-results-matrix-less-debugging
path: test-results/