77 - " tools/server/webui/**"
88
99jobs :
10- check-and-build :
10+ setup :
1111 permissions :
1212 contents : read
1313
@@ -24,14 +24,100 @@ jobs:
2424 cache : " npm"
2525 cache-dependency-path : " tools/server/webui/package-lock.json"
2626
27+ - name : Cache node_modules
28+ uses : actions/cache@v4
29+ id : cache-node-modules
30+ with :
31+ path : tools/server/webui/node_modules
32+ key : ${{ runner.os }}-node-modules-${{ hashFiles('tools/server/webui/package-lock.json') }}
33+ restore-keys : |
34+ ${{ runner.os }}-node-modules-
35+
2736 - name : Install dependencies
37+ if : steps.cache-node-modules.outputs.cache-hit != 'true'
2838 run : npm ci
2939 working-directory : tools/server/webui
3040
41+ check :
42+ needs : setup
43+ permissions :
44+ contents : read
45+
46+ runs-on : ubuntu-latest
47+
48+ steps :
49+ - name : Checkout code
50+ uses : actions/checkout@v4
51+
52+ - name : Setup Node.js
53+ uses : actions/setup-node@v4
54+ with :
55+ node-version : " 22"
56+
57+ - name : Restore node_modules cache
58+ uses : actions/cache@v4
59+ with :
60+ path : tools/server/webui/node_modules
61+ key : ${{ runner.os }}-node-modules-${{ hashFiles('tools/server/webui/package-lock.json') }}
62+ restore-keys : |
63+ ${{ runner.os }}-node-modules-
64+
3165 - name : Run type checking and linting
3266 run : npm run check
3367 working-directory : tools/server/webui
3468
69+ build :
70+ needs : check
71+ permissions :
72+ contents : read
73+
74+ runs-on : ubuntu-latest
75+
76+ steps :
77+ - name : Checkout code
78+ uses : actions/checkout@v4
79+
80+ - name : Setup Node.js
81+ uses : actions/setup-node@v4
82+ with :
83+ node-version : " 22"
84+
85+ - name : Restore node_modules cache
86+ uses : actions/cache@v4
87+ with :
88+ path : tools/server/webui/node_modules
89+ key : ${{ runner.os }}-node-modules-${{ hashFiles('tools/server/webui/package-lock.json') }}
90+ restore-keys : |
91+ ${{ runner.os }}-node-modules-
92+
93+ - name : Build application
94+ run : npm run build
95+ working-directory : tools/server/webui
96+
97+ storybook :
98+ needs : build
99+ permissions :
100+ contents : read
101+
102+ runs-on : ubuntu-latest
103+
104+ steps :
105+ - name : Checkout code
106+ uses : actions/checkout@v4
107+
108+ - name : Setup Node.js
109+ uses : actions/setup-node@v4
110+ with :
111+ node-version : " 22"
112+
113+ - name : Restore node_modules cache
114+ uses : actions/cache@v4
115+ with :
116+ path : tools/server/webui/node_modules
117+ key : ${{ runner.os }}-node-modules-${{ hashFiles('tools/server/webui/package-lock.json') }}
118+ restore-keys : |
119+ ${{ runner.os }}-node-modules-
120+
35121 - name : Install Playwright browsers
36122 run : npx playwright install --with-deps
37123 working-directory : tools/server/webui
@@ -41,10 +127,5 @@ jobs:
41127 working-directory : tools/server/webui
42128
43129 - name : Run Storybook tests
44- run : |
45- npm run test:storybook
46- working-directory : tools/server/webui
47-
48- - name : Build application
49- run : npm run build
130+ run : npm run test:storybook
50131 working-directory : tools/server/webui
0 commit comments