File tree Expand file tree Collapse file tree 7 files changed +340
-34
lines changed
Expand file tree Collapse file tree 7 files changed +340
-34
lines changed Original file line number Diff line number Diff line change @@ -1030,6 +1030,14 @@ jobs:
10301030 is_merge_group : ${{ github.event_name == 'merge_group' }}
10311031 needs : [build-gateway-container, build-mock-inference-container]
10321032
1033+ ui-storybook-tests :
1034+ permissions :
1035+ contents : read
1036+ actions : read
1037+ uses : ./.github/workflows/ui-tests-storybook.yml
1038+ with :
1039+ is_merge_group : ${{ github.event_name == 'merge_group' }}
1040+
10331041 ui-tests-e2e :
10341042 permissions :
10351043 contents : read
Original file line number Diff line number Diff line change 1+ name : UI Storybook Tests
2+
3+ on :
4+ workflow_call :
5+ inputs :
6+ is_merge_group :
7+ required : true
8+ type : boolean
9+
10+ permissions :
11+ contents : read
12+ actions : read
13+
14+ jobs :
15+ ui-storybook-tests :
16+ runs-on : ubuntu-latest
17+ if : github.repository == 'tensorzero/tensorzero'
18+
19+ steps :
20+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
21+
22+ - name : Setup Node
23+ uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
24+ with :
25+ node-version : " 24.11.0"
26+
27+ - name : Setup `pnpm`
28+ run : |
29+ for attempt in 1 2 3; do
30+ if npm install -g pnpm@latest; then
31+ break
32+ fi
33+ if [ $attempt -eq 3 ]; then
34+ echo "Failed to install pnpm after 3 attempts"
35+ exit 1
36+ fi
37+ sleep $((10 * attempt))
38+ done
39+ shell : bash
40+
41+ - name : Install `pnpm` dependencies
42+ run : pnpm install --frozen-lockfile
43+
44+ - name : Install Playwright browsers
45+ working-directory : ui
46+ run : pnpm exec playwright install chromium
47+
48+ - name : Run Storybook tests
49+ run : pnpm ui:test:storybook --run
Original file line number Diff line number Diff line change @@ -98,15 +98,15 @@ jobs:
9898 TENSORZERO_CLICKHOUSE_VERSION=${{ matrix.clickhouse_version }} docker compose -f fixtures/docker-compose.yml up clickhouse fixtures mock-inference-provider -d
9999 docker compose -f fixtures/docker-compose.yml wait fixtures
100100
101- - name : Run `pnpm test`
101+ - name : Run `pnpm test:unit `
102102 env :
103103 OPENAI_API_KEY : not_used
104104 FIREWORKS_API_KEY : not_used
105105 TENSORZERO_UI_CONFIG_PATH : fixtures/config/tensorzero.toml
106106 TENSORZERO_CLICKHOUSE_URL : http://chuser:chpassword@localhost:8123/tensorzero_ui_fixtures
107107 TENSORZERO_POSTGRES_URL : postgres://postgres:postgres@localhost:5432/tensorzero_ui_fixtures
108108 TENSORZERO_GATEWAY_URL : http://localhost:3000
109- run : pnpm ui:test
109+ run : pnpm ui:test:unit
110110
111111 - name : Run `pnpm test` for tensorzero-node
112112 working-directory : internal/tensorzero-node
Original file line number Diff line number Diff line change 77 "ui:dev" : " pnpm --filter=tensorzero-ui dev" ,
88 "ui:storybook" : " pnpm --filter=tensorzero-ui storybook" ,
99 "ui:test" : " pnpm --filter=tensorzero-ui test" ,
10+ "ui:test:unit" : " pnpm --filter=tensorzero-ui test:unit" ,
11+ "ui:test:storybook" : " pnpm --filter=tensorzero-ui test:storybook" ,
1012 "ui:test:e2e" : " pnpm --filter=tensorzero-ui test-e2e" ,
1113 "ui:test:e2e-base-path" : " pnpm --filter=tensorzero-ui test-e2e-base-path" ,
1214 "tensorzero-node:test" : " cd internal/tensorzero-node && pnpm test" ,
You can’t perform that action at this time.
0 commit comments