-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (43 loc) · 1.44 KB
/
Copy pathweb-tests.yml
File metadata and controls
53 lines (43 loc) · 1.44 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
name: Web Checks
# Type-checks the Nuxt frontend, runs the API-contract test, the component suite, and the browser
# e2e golden flows against the built app. Together they guard against frontend/backend drift and
# behavioural regressions that are invisible to `nuxt build`.
# Triggered by web changes and by changes to the OpenAPI spec the client is generated from.
on:
push:
paths:
- "web/**"
- "api/API/openapi/API_v2.json"
- ".github/workflows/web-tests.yml"
workflow_dispatch:
jobs:
web:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./web/website
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: "24"
cache: "npm"
cache-dependency-path: web/website/package-lock.json
# postinstall runs `nuxt prepare`, generating the typed API client from
# ../../api/API/openapi/API_v2.json (present in the checkout).
- name: Install dependencies
run: npm ci
- name: Type-check
run: npm run typecheck
- name: API contract test
run: npm test
- name: Component tests
run: npm run test:component
- name: Build app for e2e
run: npm run build
- name: Install Playwright browser
run: npx playwright install --with-deps chromium
- name: Browser e2e flows
run: npm run test:e2e