-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (47 loc) · 1.55 KB
/
e2e_test.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
name: E2E Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
defaults:
run:
working-directory: client
env:
PLAYWRIGHT_VERSION: null
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: 'npm'
node-version: 20
- name: Get Playwright version
run: echo "PLAYWRIGHT_VERSION=$(jq '.devDependencies["@playwright/test"]' package.json -r)" >> $GITHUB_ENV
- name: Cache Playwright Browsers
id: cache-playwright-browsers
uses: actions/cache@v4
with:
key: playwright-browsers-linux-${{ env.PLAYWRIGHT_VERSION }}
# On Linux, browser binaries are saved in `~/.cache/ms-playwright`.
# https://playwright.dev/docs/browsers#managing-browser-binaries
path: ~/.cache/ms-playwright
- name: Install Playwright system dependencies
if: steps.cache-playwright-browsers.outputs.cache-hit == 'true'
run: npx playwright install-deps
- name: Install Playwright with browser and system dependencies
if: steps.cache-playwright-browsers.outputs.cache-hit != 'true'
run: npx playwright install --with-deps
- name: Install modules
run: npm ci
- name: Run E2E tests
run: npm run test:e2e
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30