-
-
Notifications
You must be signed in to change notification settings - Fork 296
69 lines (64 loc) · 2.25 KB
/
Copy pathbuild-ui.yml
File metadata and controls
69 lines (64 loc) · 2.25 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
name: build ui
on:
pull_request:
paths:
- "webapp/**"
- "pyproject.toml"
push:
paths:
- "webapp/**"
- "pyproject.toml"
branches: [master]
permissions:
contents: read
env:
NODE_VERSION: "24"
jobs:
build-ui:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Use Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: "${{ env.NODE_VERSION }}"
cache: "npm"
cache-dependency-path: webapp/package-lock.json
- name: Install dependencies
working-directory: ./webapp
run: npm ci
- name: Build
working-directory: ./webapp
run: npm run build
- name: Unit tests (vitest)
working-directory: ./webapp
run: npm run test:run
- name: Check formatting with Prettier
working-directory: ./webapp
run: npx prettier . --check
e2e-ui:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Use Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: "${{ env.NODE_VERSION }}"
cache: "npm"
cache-dependency-path: webapp/package-lock.json
- name: Install dependencies
working-directory: ./webapp
run: npm ci
- name: Install Playwright browsers
working-directory: ./webapp
run: npx playwright install --with-deps chromium
- name: Run Playwright tests (mock mode, no backend)
working-directory: ./webapp
run: npm run test:e2e
- name: Upload Playwright report
if: failure()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: webapp/playwright-report
retention-days: 7