-
Notifications
You must be signed in to change notification settings - Fork 2
61 lines (48 loc) · 1.59 KB
/
ci.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
# .github/workflows/test.yml
name: Test
on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
jobs:
unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Generate package-lock.json
run: npm install --package-lock-only
- name: Install dependencies
run: npm ci
- name: Run unit tests
run: npm run unit
integration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Generate package-lock.json
run: npm install --package-lock-only
- name: Install dependencies
run: npm ci
- name: Install Playwright browsers
run: npx playwright install --with-deps chromium
- name: Run integration tests
run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run integration
env:
PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH: /usr/bin/google-chrome
PLAYWRIGHT_LAUNCH_OPTIONS: '{"args": ["--enable-unsafe-webgpu", "--enable-features=Vulkan,UseSkiaRenderer", "--enable-dawn-features=allow_unsafe_apis"]}'
- name: Upload Playwright report
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30