1+ name : JWA Frontend Tests
2+ on :
3+ pull_request :
4+ paths :
5+ - components/crud-web-apps/jupyter/frontend/**
6+ - releasing/version/VERSION
7+ branches :
8+ - main
9+ - notebooks-v1
10+ - ' v*-branch'
11+
12+ jobs :
13+ frontend-format-linting-check :
14+ name : Check code format and lint
15+ runs-on : ubuntu-22.04
16+ defaults :
17+ run :
18+ working-directory : components/crud-web-apps/jupyter/frontend
19+ steps :
20+ - name : Check out code
21+ uses : actions/checkout@v4
22+ - name : Setup Node
23+ uses : actions/setup-node@v4
24+ with :
25+ node-version : 16
26+ - name : Install dependencies
27+ run : npm ci
28+ - name : Check frontend formatting
29+ run : npm run format:check
30+ - name : Check frontend code linting
31+ run : npm run lint-check
32+
33+ frontend-unit-tests :
34+ runs-on : ubuntu-22.04
35+ name : Unit tests
36+ steps :
37+ - name : Checkout
38+ uses : actions/checkout@v4
39+
40+ - name : Setup node version to 16
41+ uses : actions/setup-node@v4
42+ with :
43+ node-version : 16
44+
45+ - name : Install Kubeflow common library dependecies
46+ run : |
47+ cd components/crud-web-apps/common/frontend/kubeflow-common-lib
48+ npm i
49+ npm run build
50+ npm link ./dist/kubeflow
51+
52+ - name : Install JWA dependencies
53+ run : |
54+ cd components/crud-web-apps/jupyter/frontend
55+ npm i
56+ npm link kubeflow
57+
58+ - name : Run unit tests
59+ run : |
60+ cd components/crud-web-apps/jupyter/frontend
61+ npm run test:prod
62+
63+ run-ui-tests :
64+ name : UI tests with Playwright
65+ runs-on : ubuntu-22.04
66+ steps :
67+ - name : Checkout
68+ uses : actions/checkout@v4
69+
70+ - name : Setup node version to 16
71+ uses : actions/setup-node@v4
72+ with :
73+ node-version : 16
74+
75+ - name : Install Kubeflow common library dependecies
76+ run : |
77+ cd components/crud-web-apps/common/frontend/kubeflow-common-lib
78+ npm i
79+ npm run build
80+ npm link ./dist/kubeflow
81+
82+ - name : Install JWA dependencies
83+ run : |
84+ cd components/crud-web-apps/jupyter/frontend
85+ npm i
86+ npm link kubeflow
87+
88+ - name : Serve UI & run Playwright tests in Chrome and Firefox
89+ run : |
90+ cd components/crud-web-apps/jupyter/frontend
91+ npm run serve > serve.log 2>&1 & npx wait-on http://localhost:4200
92+ npx playwright install
93+ npm run ui-test-ci-all
0 commit comments