-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.24 KB
/
Copy pathtest.yml
File metadata and controls
47 lines (39 loc) · 1.24 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
name: Test
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup Node
uses: actions/setup-node@v7
with:
node-version: 24
cache: npm
- name: Install dependencies
run: npm ci
- name: Install Playwright browsers
run: npx playwright install --with-deps chromium webkit
- name: Run checks and browser tests
env:
CI: true
run: npm run test:ci
# Render the real self-hosted viewer under its real strict CSP in a browser, so a future build
# that the header-only unit tests cannot see (eval, runtime-injected inline scripts) fails CI
# instead of shipping a white screen. Needs a root build (test:ci's e2e build is subpath).
- name: Self-hosted CSP browser smoke
env:
CI: true
run: npm run build && (npm run selfhosted:csp-smoke || npm run selfhosted:csp-smoke)
- name: Upload Playwright report
if: always()
uses: actions/upload-artifact@v7
with:
name: playwright-report
path: playwright-report
if-no-files-found: ignore