From 0879a37e3f4606bd171e109a8b0d5e034c8bd78a Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Thu, 9 Apr 2026 14:34:41 -0700 Subject: [PATCH 1/2] improvement(ci): parallelize Docker builds with tests and remove duplicate turbo install --- .github/workflows/ci.yml | 4 ++-- docker/app.Dockerfile | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 14837501f95..7413dc33272 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,7 +48,7 @@ jobs: # Build AMD64 images and push to ECR immediately (+ GHCR for main) build-amd64: name: Build AMD64 - needs: [test-build, detect-version] + needs: [detect-version] if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/dev') runs-on: blacksmith-8vcpu-ubuntu-2404 permissions: @@ -150,7 +150,7 @@ jobs: # Build ARM64 images for GHCR (main branch only, runs in parallel) build-ghcr-arm64: name: Build ARM64 (GHCR Only) - needs: [test-build, detect-version] + needs: [detect-version] runs-on: blacksmith-8vcpu-ubuntu-2404-arm if: github.event_name == 'push' && github.ref == 'refs/heads/main' permissions: diff --git a/docker/app.Dockerfile b/docker/app.Dockerfile index 54791300d58..07641931f04 100644 --- a/docker/app.Dockerfile +++ b/docker/app.Dockerfile @@ -25,11 +25,10 @@ COPY packages/testing/package.json ./packages/testing/package.json COPY packages/logger/package.json ./packages/logger/package.json COPY packages/tsconfig/package.json ./packages/tsconfig/package.json -# Install turbo globally, then dependencies, then rebuild isolated-vm for Node.js +# Install dependencies, then rebuild isolated-vm for Node.js # Use --linker=hoisted for flat node_modules layout (required for Docker multi-stage builds) RUN --mount=type=cache,id=bun-cache,target=/root/.bun/install/cache \ --mount=type=cache,id=npm-cache,target=/root/.npm \ - bun install -g turbo && \ HUSKY=0 bun install --omit=dev --ignore-scripts --linker=hoisted && \ cd node_modules/isolated-vm && npx node-gyp rebuild --release From 1d3e9d989067771e60ee939ab6b49bafa0c08657 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Thu, 9 Apr 2026 14:41:48 -0700 Subject: [PATCH 2/2] fix(test): use SecureFetchResponse shape in mock instead of standard Response --- apps/sim/tools/index.test.ts | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/apps/sim/tools/index.test.ts b/apps/sim/tools/index.test.ts index 3fa4073ac3b..cef7cc82a19 100644 --- a/apps/sim/tools/index.test.ts +++ b/apps/sim/tools/index.test.ts @@ -487,12 +487,17 @@ describe('Automatic Internal Route Detection', () => { cleanupEnvVars = setupEnvVars({ NEXT_PUBLIC_APP_URL: 'http://localhost:3000' }) mockValidateUrlWithDNS.mockResolvedValue({ isValid: true, resolvedIP: '93.184.216.34' }) - mockSecureFetchWithPinnedIP.mockResolvedValue( - new Response(JSON.stringify({}), { - status: 200, - headers: { 'content-type': 'application/json' }, - }) - ) + mockSecureFetchWithPinnedIP.mockResolvedValue({ + ok: true, + status: 200, + statusText: 'OK', + headers: { + get: (name: string) => (name.toLowerCase() === 'content-type' ? 'application/json' : null), + toRecord: () => ({ 'content-type': 'application/json' }), + }, + text: async () => JSON.stringify({}), + json: async () => ({}), + }) }) afterEach(() => {