-
Notifications
You must be signed in to change notification settings - Fork 16
91 lines (75 loc) · 2.26 KB
/
e2e-local.yml
File metadata and controls
91 lines (75 loc) · 2.26 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: E2E — Local
on:
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:
concurrency:
group: e2e-local-${{ github.ref }}
cancel-in-progress: true
jobs:
install:
name: Install dependencies
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
cache: 'npm'
- name: Install project dependencies
run: npm ci
- name: Install test dependencies
working-directory: puppeteer-tests
run: npm ci
- name: Cache node_modules and Puppeteer browsers
uses: actions/cache/save@v4
with:
path: |
node_modules
puppeteer-tests/node_modules
~/.cache/puppeteer
key: nm-${{ runner.os }}-${{ hashFiles('package-lock.json', 'puppeteer-tests/package-lock.json') }}
e2e:
name: E2E local — ${{ matrix.suite }}
needs: install
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
suite: [home, editor]
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
- name: Restore node_modules and Puppeteer browsers
uses: actions/cache/restore@v4
with:
path: |
node_modules
puppeteer-tests/node_modules
~/.cache/puppeteer
key: nm-${{ runner.os }}-${{ hashFiles('package-lock.json', 'puppeteer-tests/package-lock.json') }}
- name: Start dev server
run: npm run start -- --open false &
env:
BROWSER: none
- name: Wait for dev server
run: npx wait-on http://localhost:3000 --timeout 120000
- name: Run ${{ matrix.suite }} tests
working-directory: puppeteer-tests
run: node --test tests/${{ matrix.suite }}.js
env:
TARGET: local
- name: Upload debug artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: e2e-debug-${{ matrix.suite }}
path: puppeteer-tests/screenshots/
retention-days: 7
if-no-files-found: ignore