-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (49 loc) · 1.3 KB
/
e2e.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
name: E2E tests
on:
workflow_call:
workflow_dispatch:
schedule:
- cron: "30 9 * * *"
pull_request:
types: [ opened, synchronize ]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
env:
PLAYWRIGHT_BROWSERS_PATH: pw-browsers/
defaults:
run:
working-directory: ./e2e
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: Cache restore
uses: actions/cache@v4
with:
path: |
e2e/node_modules
e2e/$PLAYWRIGHT_BROWSERS_PATH
key: "${{ runner.os }}-node-${{ hashFiles('e2e/package-lock.json') }}"
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npm run pw install chromium --with-deps
- name: Run Playwright tests
run: npm test
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: |
e2e/playwright-report/
e2e/test-results/
retention-days: 10
- name: Run CTRF results
if: always()
run: |
npx github-actions-ctrf tests ctrf/ctrf-report.json --pr-comment
env:
GITHUB_TOKEN: {{ secrets.GITHUB_TOKEN }}