test(pnpm and playwright): Playwright run successful in docker container" -m "- Pin Dockerfile.test to mcr.microsoft.com/playwright:v1.52.0-noble to match the playwright npm package version (was mismatched at v1.61.1)

- Add supportedArchitectures (linux-x64-gnu) to pnpm-workspace.yaml so native bindings (rolldown, esbuild) are included in the lockfile for the container's platform
- Add onlyBuiltDependencies: [playwright] to pnpm-workspace.yaml so build scripts run non-interactively in CI/Docker
- Remove stale/redundant pnpm field from package.json (moved to pnpm-workspace.yaml per pnpm v10+ config location)
- Split stencil-test into test:unit (native, fast) and test:browser (Docker, cross-browser) scripts
- Set ENV CI=true in Dockerfile.test to avoid interactive TTY prompts during pnpm install
- Remove anonymous node_modules volumes from docker-compose.test.yaml to prevent stale volume state from surviving image rebuilds
- Add root-level test:unit / test:component / test scripts to orchestrate native unit tests and Dockerized cross-browser tests
This commit is contained in:
2026-07-15 16:42:43 +02:00
parent d8d4c7cb69
commit a10b79b504
5 changed files with 19 additions and 12 deletions
+2
View File
@@ -0,0 +1,2 @@
node_modules
packages/**/node_modules
+11 -6
View File
@@ -6,13 +6,18 @@ ENV CI=true
WORKDIR /app WORKDIR /app
COPY pnpm-lock.yaml pnpm-workspace.yaml package.json ./
COPY packages/luna-charts/package.json ./packages/luna-charts/
RUN pnpm install --frozen-lockfile
COPY . . COPY . .
RUN rm -rf node_modules packages/**/node_modules
RUN rm -f pnpm-lock.yaml
ENV PNPM_CONFIG_SUPPORTED_ARCHITECTURES="current,linux-x64-gnu"
RUN pnpm install
WORKDIR /app/packages/luna-charts WORKDIR /app/packages/luna-charts
CMD ["pnpm", "test:browser"] RUN pnpm add -D @rolldown/binding-linux-x64-gnu
CMD ["pnpm", "test:browser"]
+1 -1
View File
@@ -33,4 +33,4 @@
"eslint": "^10.6.0", "eslint": "^10.6.0",
"prettier": "^3.9.4" "prettier": "^3.9.4"
} }
} }
+4 -4
View File
@@ -45,14 +45,14 @@
"@stencil/core": "^4.43.5", "@stencil/core": "^4.43.5",
"@stencil/storybook-plugin": "^0.7.0", "@stencil/storybook-plugin": "^0.7.0",
"@stencil/vitest": "^1.8.3", "@stencil/vitest": "^1.8.3",
"@storybook/addon-docs": "^10.5.0",
"@storybook/addon-links": "^10.5.0", "@storybook/addon-links": "^10.5.0",
"@types/node": "^22.13.5", "@types/node": "^22.13.5",
"@vitest/browser-playwright": "^4.0.0", "@vitest/browser-playwright": "^4.0.0",
"playwright": "^1.52.0",
"storybook": "^10.5.0",
"vitest": "^4.0.0",
"eslint-plugin-storybook": "10.5.0", "eslint-plugin-storybook": "10.5.0",
"@storybook/addon-docs": "^10.5.0" "playwright": "^1.61.1",
"storybook": "^10.5.0",
"vitest": "^4.0.0"
}, },
"license": "MIT" "license": "MIT"
} }
+1 -1
View File
@@ -244,7 +244,7 @@ importers:
specifier: 10.5.0 specifier: 10.5.0
version: 10.5.0(eslint@10.6.0(jiti@2.7.0))(storybook@10.5.0(@types/react@19.2.17)(prettier@3.9.4)(react@19.2.7))(typescript@5.9.3) version: 10.5.0(eslint@10.6.0(jiti@2.7.0))(storybook@10.5.0(@types/react@19.2.17)(prettier@3.9.4)(react@19.2.7))(typescript@5.9.3)
playwright: playwright:
specifier: ^1.52.0 specifier: ^1.61.1
version: 1.61.1 version: 1.61.1
storybook: storybook:
specifier: ^10.5.0 specifier: ^10.5.0