diff --git a/scripts/e2e/Dockerfile b/scripts/e2e/Dockerfile index 257c852e654..e8bd039155d 100644 --- a/scripts/e2e/Dockerfile +++ b/scripts/e2e/Dockerfile @@ -8,7 +8,7 @@ WORKDIR /app ENV NODE_OPTIONS="--disable-warning=ExperimentalWarning" -COPY package.json pnpm-lock.yaml pnpm-workspace.yaml tsconfig.json tsconfig.plugin-sdk.dts.json tsdown.config.ts vitest.config.ts vitest.e2e.config.ts openclaw.mjs ./ +COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./ COPY ui/package.json ./ui/package.json COPY extensions/memory-core/package.json ./extensions/memory-core/package.json COPY patches ./patches @@ -16,6 +16,7 @@ COPY patches ./patches RUN --mount=type=cache,id=openclaw-pnpm-store,target=/root/.local/share/pnpm/store,sharing=locked \ pnpm install --frozen-lockfile +COPY tsconfig.json tsconfig.plugin-sdk.dts.json tsdown.config.ts vitest.config.ts vitest.e2e.config.ts openclaw.mjs ./ COPY src ./src COPY test ./test COPY scripts ./scripts diff --git a/src/docker-build-cache.test.ts b/src/docker-build-cache.test.ts index 99df5d4e430..6f56ef4f5c7 100644 --- a/src/docker-build-cache.test.ts +++ b/src/docker-build-cache.test.ts @@ -86,12 +86,20 @@ describe("docker build cache layout", () => { const dockerfile = await readRepoFile("scripts/e2e/Dockerfile"); const installIndex = dockerfile.indexOf("pnpm install --frozen-lockfile"); + expect( + dockerfile.indexOf("COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./"), + ).toBeLessThan(installIndex); expect(dockerfile.indexOf("COPY ui/package.json ./ui/package.json")).toBeLessThan(installIndex); expect( dockerfile.indexOf( "COPY extensions/memory-core/package.json ./extensions/memory-core/package.json", ), ).toBeLessThan(installIndex); + expect( + dockerfile.indexOf( + "COPY tsconfig.json tsconfig.plugin-sdk.dts.json tsdown.config.ts vitest.config.ts vitest.e2e.config.ts openclaw.mjs ./", + ), + ).toBeGreaterThan(installIndex); expect(dockerfile.indexOf("COPY src ./src")).toBeGreaterThan(installIndex); expect(dockerfile.indexOf("COPY test ./test")).toBeGreaterThan(installIndex); expect(dockerfile.indexOf("COPY scripts ./scripts")).toBeGreaterThan(installIndex);