|
15 | 15 | required: true |
16 | 16 |
|
17 | 17 | jobs: |
18 | | - |
19 | 18 | ui-tests-no-network: |
20 | 19 | # We're only using namespace here so that we can download the container artifacts |
21 | 20 | runs-on: namespace-profile-tensorzero-2x8 |
22 | 21 | steps: |
23 | | - - name: Set DNS |
24 | | - run: echo "127.0.0.1 howdy.tensorzero.com" | sudo tee -a /etc/hosts |
25 | | - - uses: namespacelabs/nscloud-checkout-action@953fed31a6113cc2347ca69c9d823743c65bc84b |
26 | | - - name: Setup Node |
27 | | - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 |
28 | | - with: |
29 | | - node-version: "22.9.0" |
30 | | - |
31 | | - - name: Download container images |
32 | | - uses: namespace-actions/download-artifact@5c070f7d7ebdc47682b04aa736c76e46ff5f6e1e |
33 | | - with: |
34 | | - pattern: build-*-container |
35 | | - merge-multiple: true |
36 | | - |
37 | | - - name: Load `gateway` and `ui` containers |
38 | | - run: | |
39 | | - docker load < gateway-container.tar |
40 | | - docker load < ui-container.tar |
41 | | -
|
42 | | - # This allows us to use 'no-build' on subsequent steps |
43 | | - - name: Build needed docker images |
44 | | - working-directory: ui |
45 | | - run: | |
46 | | - docker compose -f fixtures/docker-compose.e2e.yml -f fixtures/docker-compose.ui.yml build fixtures mock-inference-provider |
47 | | -
|
48 | | - - name: Start docker containers without external network access |
49 | | - working-directory: ui |
50 | | - run: | |
51 | | - # Environment variables shared by the gateway and ui containers |
52 | | - echo "TENSORZERO_CLICKHOUSE_URL=http://chuser:chpassword@clickhouse:8123/tensorzero_ui_fixtures" >> fixtures/.env |
53 | | - echo "TENSORZERO_GATEWAY_URL=http://gateway:3000" >> fixtures/.env |
54 | | - echo "TENSORZERO_GATEWAY_TAG=sha-${{ github.sha }}" >> fixtures/.env |
55 | | - echo "TENSORZERO_UI_TAG=sha-${{ github.sha }}" >> fixtures/.env |
56 | | - echo "TENSORZERO_GATEWAY_CONFIG=/app/config/empty.toml" >> fixtures/.env |
57 | | - echo "TENSORZERO_UI_CONFIG_PATH=/app/config/empty.toml" >> fixtures/.env |
58 | | -
|
59 | | - export TENSORZERO_SKIP_LARGE_FIXTURES=1 |
60 | | - docker compose -f fixtures/docker-compose.e2e.yml -f fixtures/docker-compose.ui.yml -f ../ci/internal-network.yml up --no-build -d |
61 | | -
|
62 | | - - name: Print Docker Compose logs |
63 | | - if: always() |
64 | | - working-directory: ui |
65 | | - run: docker compose -f fixtures/docker-compose.e2e.yml -f fixtures/docker-compose.ui.yml logs -t |
66 | | - |
67 | | - - name: Print container health checks |
68 | | - if: always() |
69 | | - working-directory: ui |
70 | | - run: docker inspect --format "{{json .State.Health }}" $(docker compose -f fixtures/docker-compose.e2e.yml -f fixtures/docker-compose.ui.yml ps -q ui) | jq |
| 22 | + - name: Set DNS |
| 23 | + run: echo "127.0.0.1 howdy.tensorzero.com" | sudo tee -a /etc/hosts |
| 24 | + - uses: namespacelabs/nscloud-checkout-action@953fed31a6113cc2347ca69c9d823743c65bc84b |
| 25 | + - name: Setup Node |
| 26 | + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 |
| 27 | + with: |
| 28 | + node-version: "22.9.0" |
| 29 | + |
| 30 | + - name: Download container images |
| 31 | + uses: namespace-actions/download-artifact@5c070f7d7ebdc47682b04aa736c76e46ff5f6e1e |
| 32 | + with: |
| 33 | + pattern: build-*-container |
| 34 | + merge-multiple: true |
| 35 | + |
| 36 | + - name: Load `gateway` and `ui` containers |
| 37 | + run: | |
| 38 | + docker load < gateway-container.tar |
| 39 | + docker load < ui-container.tar |
| 40 | +
|
| 41 | + # This allows us to use 'no-build' on subsequent steps |
| 42 | + - name: Build needed docker images |
| 43 | + working-directory: ui |
| 44 | + run: | |
| 45 | + docker compose -f fixtures/docker-compose.e2e.yml -f fixtures/docker-compose.ui.yml build fixtures mock-inference-provider |
| 46 | +
|
| 47 | + - name: Start docker containers without external network access |
| 48 | + working-directory: ui |
| 49 | + run: | |
| 50 | + # Environment variables shared by the gateway and ui containers |
| 51 | + echo "TENSORZERO_CLICKHOUSE_URL=http://chuser:chpassword@clickhouse:8123/tensorzero_ui_fixtures" >> fixtures/.env |
| 52 | + echo "TENSORZERO_GATEWAY_URL=http://gateway:3000" >> fixtures/.env |
| 53 | + echo "TENSORZERO_GATEWAY_TAG=sha-${{ github.sha }}" >> fixtures/.env |
| 54 | + echo "TENSORZERO_UI_TAG=sha-${{ github.sha }}" >> fixtures/.env |
| 55 | + echo "TENSORZERO_GATEWAY_CONFIG=/app/config/empty.toml" >> fixtures/.env |
| 56 | + echo "TENSORZERO_UI_CONFIG_PATH=/app/config/empty.toml" >> fixtures/.env |
| 57 | +
|
| 58 | + export TENSORZERO_SKIP_LARGE_FIXTURES=1 |
| 59 | + docker compose -f fixtures/docker-compose.e2e.yml -f fixtures/docker-compose.ui.yml -f ../ci/internal-network.yml up --no-build -d |
| 60 | +
|
| 61 | + - name: Print Docker Compose logs |
| 62 | + if: always() |
| 63 | + working-directory: ui |
| 64 | + run: docker compose -f fixtures/docker-compose.e2e.yml -f fixtures/docker-compose.ui.yml logs -t |
71 | 65 |
|
| 66 | + - name: Print container health checks |
| 67 | + if: always() |
| 68 | + working-directory: ui |
| 69 | + run: docker inspect --format "{{json .State.Health }}" $(docker compose -f fixtures/docker-compose.e2e.yml -f fixtures/docker-compose.ui.yml ps -q ui) | jq |
72 | 70 |
|
73 | 71 | ui-tests-gateway-prefix: |
74 | 72 | # We're only using namespace here so that we can download the container artifacts |
@@ -137,6 +135,13 @@ jobs: |
137 | 135 | continue-on-error: true |
138 | 136 | run: pnpm ui:test:e2e-base-path |
139 | 137 |
|
| 138 | + - name: Run UI E2E tests that require credentials |
| 139 | + id: e2e_tests_credentials |
| 140 | + env: |
| 141 | + TENSORZERO_CI: 1 |
| 142 | + continue-on-error: true |
| 143 | + run: pnpm ui:test:e2e --grep "@credentials" |
| 144 | + |
140 | 145 | - name: Print Docker Compose logs |
141 | 146 | if: always() |
142 | 147 | working-directory: ui |
@@ -253,7 +258,7 @@ jobs: |
253 | 258 | env: |
254 | 259 | TENSORZERO_CI: 1 |
255 | 260 | continue-on-error: true |
256 | | - run: pnpm ui:test:e2e |
| 261 | + run: pnpm ui:test:e2e --grep-invert "@credentials" |
257 | 262 |
|
258 | 263 | - name: Print Docker Compose logs |
259 | 264 | if: always() |
|
0 commit comments