From 06e60e08d28e0ec8a8c0539b11101e2ca8639403 Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Wed, 2 Sep 2026 22:09:55 -0700 Subject: [PATCH] ci(ui): run the UI build check through the image's ui-builder stage The build-ui check compiled the dashboard from a full checkout, so any import reaching above ui/litellm-dashboard/ resolved there and only broke inside the images, where the stage copies the dashboard tree alone. Building the stage itself puts the check on the same file boundary the shipped images use. --- .github/workflows/test-litellm-ui-build.yml | 24 ++++++--------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/.github/workflows/test-litellm-ui-build.yml b/.github/workflows/test-litellm-ui-build.yml index b3a07a6e0ff..4eb6b272c43 100644 --- a/.github/workflows/test-litellm-ui-build.yml +++ b/.github/workflows/test-litellm-ui-build.yml @@ -19,9 +19,6 @@ jobs: build-ui: runs-on: ubuntu-latest timeout-minutes: 10 - defaults: - run: - working-directory: ui/litellm-dashboard steps: - name: Checkout repository @@ -35,18 +32,11 @@ jobs: with: category: ui - - name: Setup Node.js + # Built through the image stage rather than the checkout, because the + # stage copies ui/litellm-dashboard/ alone: an import reaching above the + # dashboard root resolves in a checkout and fails in every image we ship. + # Dockerfile, docker/Dockerfile.non_root and ui/Dockerfile share this + # stage verbatim, so building one covers all three. + - name: Build the dashboard as the shipped images build it if: steps.changes.outputs.decision != 'skip' - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 - with: - node-version-file: ui/litellm-dashboard/.nvmrc - cache: "npm" - cache-dependency-path: ui/litellm-dashboard/package-lock.json - - - name: Install dependencies - if: steps.changes.outputs.decision != 'skip' - run: npm ci - - - name: Build - if: steps.changes.outputs.decision != 'skip' - run: npm run build + run: docker build --target ui-builder -f Dockerfile .