-
Notifications
You must be signed in to change notification settings - Fork 32
54 lines (44 loc) · 1.29 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
name: End-to-end (e2e) Tests
on:
# Run on all pull requests.
pull_request:
push:
branches:
- trunk
# 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:
test:
name: e2e against WordPress latest
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use desired version of NodeJS
uses: actions/[email protected]
with:
node-version: 16
cache: npm
- name: Npm install
run: |
npm ci
- name: Start up WordPress environment
run: |
npm run dev:start
- name: Running the tests
run: |
npm run test:e2e -- --listTests > ~/.jest-e2e-tests
npm run test:e2e
- name: Stop WordPress environment
run: |
npm run dev:stop
- name: Archive e2e results
uses: actions/upload-artifact@v4
if: failure()
with:
name: test-results
path: artifacts