-
Notifications
You must be signed in to change notification settings - Fork 125
90 lines (81 loc) · 2.37 KB
/
web-test-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
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
name: End-to-end tests of web+runtime
on:
pull_request:
paths:
- ".github/workflows/web-test.yml"
- "admin/**"
- "cli/**"
- "runtime/**"
- "web-admin/**"
- "web-auth/**"
- "web-common/**"
- "web-local/**"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Filter modified codepaths
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
admin:
- ".github/workflows/web-test.yml"
- "admin/**"
- "cli/**"
- "runtime/**"
- "web-admin/**"
auth:
- ".github/workflows/web-test.yml"
- "web-auth/**"
local:
- ".github/workflows/web-test.yml"
- "cli/**"
- "runtime/**"
- "web-local/**"
common:
- ".github/workflows/web-test.yml"
- "cli/**"
- "runtime/**"
- "web-common/**"
- name: Set up NodeJS
uses: actions/setup-node@v4
with:
node-version: 20
- name: Set up go for E2E
uses: actions/setup-go@v5
with:
go-version: 1.23
- name: go build cache
uses: actions/cache@v4
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: NPM Install
run: npm install
# https://typicode.github.io/husky/how-to.html#ci-server-and-docker
env:
HUSKY: 0
- name: Build and embed static UI
run: PLAYWRIGHT_TEST=true make cli
- name: Install browser for UI tests
run: npx playwright install
- name: Test web local
if: ${{ steps.filter.outputs.local == 'true' || steps.filter.outputs.common == 'true' }}
run: npm run test -w web-local
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: web-local/playwright-report/
retention-days: 30
- name: Build web admin
if: ${{ steps.filter.outputs.admin == 'true' || steps.filter.outputs.common == 'true' }}
run: |-
npm run build -w web-admin