Skip to content

Commit 6853bee

Browse files
authored
ci : clean up webui jobs (#18116)
* clean up webui jobs * refined step control * forgot dependencies * apparently always() is needed
1 parent 487674f commit 6853bee

File tree

1 file changed

+18
-88
lines changed

1 file changed

+18
-88
lines changed

.github/workflows/server-webui.yml

Lines changed: 18 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ concurrency:
3131
cancel-in-progress: true
3232

3333
jobs:
34-
webui-setup:
35-
name: WebUI Setup
34+
webui-check:
35+
name: WebUI Checks
3636
runs-on: ubuntu-latest
37+
continue-on-error: true
3738
steps:
3839
- name: Checkout code
3940
uses: actions/checkout@v4
@@ -42,137 +43,66 @@ jobs:
4243
ref: ${{ github.event.inputs.sha || github.event.pull_request.head.sha || github.sha || github.head_ref || github.ref_name }}
4344

4445
- name: Setup Node.js
46+
id: node
4547
uses: actions/setup-node@v4
4648
with:
4749
node-version: "22"
4850
cache: "npm"
4951
cache-dependency-path: "tools/server/webui/package-lock.json"
5052

51-
- name: Cache node_modules
52-
uses: actions/cache@v4
53-
id: cache-node-modules
54-
with:
55-
path: tools/server/webui/node_modules
56-
key: ${{ runner.os }}-node-modules-${{ hashFiles('tools/server/webui/package-lock.json') }}
57-
restore-keys: |
58-
${{ runner.os }}-node-modules-
59-
6053
- name: Install dependencies
61-
if: steps.cache-node-modules.outputs.cache-hit != 'true'
54+
id: setup
55+
if: ${{ steps.node.conclusion == 'success' }}
6256
run: npm ci
6357
working-directory: tools/server/webui
6458

65-
webui-check:
66-
needs: webui-setup
67-
name: WebUI Check
68-
runs-on: ubuntu-latest
69-
steps:
70-
- name: Checkout code
71-
uses: actions/checkout@v4
72-
with:
73-
fetch-depth: 0
74-
ref: ${{ github.event.inputs.sha || github.event.pull_request.head.sha || github.sha || github.head_ref || github.ref_name }}
75-
76-
- name: Setup Node.js
77-
uses: actions/setup-node@v4
78-
with:
79-
node-version: "22"
80-
81-
- name: Restore node_modules cache
82-
uses: actions/cache@v4
83-
with:
84-
path: tools/server/webui/node_modules
85-
key: ${{ runner.os }}-node-modules-${{ hashFiles('tools/server/webui/package-lock.json') }}
86-
restore-keys: |
87-
${{ runner.os }}-node-modules-
88-
8959
- name: Run type checking
60+
if: ${{ always() && steps.setup.conclusion == 'success' }}
9061
run: npm run check
9162
working-directory: tools/server/webui
9263

9364
- name: Run linting
65+
if: ${{ always() && steps.setup.conclusion == 'success' }}
9466
run: npm run lint
9567
working-directory: tools/server/webui
9668

97-
webui-build:
98-
needs: webui-check
99-
name: WebUI Build
100-
runs-on: ubuntu-latest
101-
steps:
102-
- name: Checkout code
103-
uses: actions/checkout@v4
104-
with:
105-
fetch-depth: 0
106-
ref: ${{ github.event.inputs.sha || github.event.pull_request.head.sha || github.sha || github.head_ref || github.ref_name }}
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-
12169
- name: Build application
70+
if: ${{ always() && steps.setup.conclusion == 'success' }}
12271
run: npm run build
12372
working-directory: tools/server/webui
12473

125-
webui-tests:
126-
needs: webui-build
127-
name: Run WebUI tests
128-
permissions:
129-
contents: read
130-
131-
runs-on: ubuntu-latest
132-
133-
steps:
134-
- name: Checkout code
135-
uses: actions/checkout@v4
136-
137-
- name: Setup Node.js
138-
uses: actions/setup-node@v4
139-
with:
140-
node-version: "22"
141-
142-
- name: Restore node_modules cache
143-
uses: actions/cache@v4
144-
with:
145-
path: tools/server/webui/node_modules
146-
key: ${{ runner.os }}-node-modules-${{ hashFiles('tools/server/webui/package-lock.json') }}
147-
restore-keys: |
148-
${{ runner.os }}-node-modules-
149-
15074
- name: Install Playwright browsers
75+
id: playwright
76+
if: ${{ always() && steps.setup.conclusion == 'success' }}
15177
run: npx playwright install --with-deps
15278
working-directory: tools/server/webui
15379

15480
- name: Build Storybook
81+
if: ${{ always() && steps.playwright.conclusion == 'success' }}
15582
run: npm run build-storybook
15683
working-directory: tools/server/webui
15784

15885
- name: Run Client tests
86+
if: ${{ always() && steps.playwright.conclusion == 'success' }}
15987
run: npm run test:client
16088
working-directory: tools/server/webui
16189

162-
- name: Run Server tests
163-
run: npm run test:server
90+
- name: Run Unit tests
91+
if: ${{ always() && steps.playwright.conclusion == 'success' }}
92+
run: npm run test:unit
16493
working-directory: tools/server/webui
16594

16695
- name: Run UI tests
96+
if: ${{ always() && steps.playwright.conclusion == 'success' }}
16797
run: npm run test:ui -- --testTimeout=60000
16898
working-directory: tools/server/webui
16999

170100
- name: Run E2E tests
101+
if: ${{ always() && steps.playwright.conclusion == 'success' }}
171102
run: npm run test:e2e
172103
working-directory: tools/server/webui
173104

174105
server-build:
175-
needs: [webui-tests]
176106
runs-on: ubuntu-latest
177107

178108
strategy:

0 commit comments

Comments
 (0)