chore: add Chromium installation for Karma tests and update devcontainer configuration

This commit is contained in:
Denys Vuika
2026-07-07 15:02:54 +00:00
parent 8973589ef9
commit d4ea7a43b0
4 changed files with 21 additions and 2 deletions
+5
View File
@@ -8,6 +8,11 @@ ARG PNPM_VERSION=11.5.0
ENV PNPM_HOME=/home/node/.local/share/pnpm ENV PNPM_HOME=/home/node/.local/share/pnpm
ENV PATH=${PNPM_HOME}:${PATH} ENV PATH=${PNPM_HOME}:${PATH}
# Install Chromium for Karma/ChromeHeadless test execution inside the container.
RUN apt-get update \
&& apt-get install -y --no-install-recommends chromium \
&& rm -rf /var/lib/apt/lists/*
# Configure Corepack-managed pnpm globally at image build time. # Configure Corepack-managed pnpm globally at image build time.
RUN corepack enable \ RUN corepack enable \
&& corepack prepare pnpm@${PNPM_VERSION} --activate \ && corepack prepare pnpm@${PNPM_VERSION} --activate \
+2 -1
View File
@@ -47,7 +47,8 @@
"CI": "true", "CI": "true",
"NODE_ENV": "development", "NODE_ENV": "development",
"NO_UPDATE_NOTIFIER": "1", "NO_UPDATE_NOTIFIER": "1",
"PNPM_STORE_DIR": "/home/node/.pnpm-store" "PNPM_STORE_DIR": "/home/node/.pnpm-store",
"CHROME_BIN": "/usr/bin/chromium"
}, },
"mounts": ["source=alfresco-ng2-pnpm-store,target=/home/node/.pnpm-store,type=volume"], "mounts": ["source=alfresco-ng2-pnpm-store,target=/home/node/.pnpm-store,type=volume"],
+13
View File
@@ -23,6 +23,19 @@ Typical day-to-day actions:
- Reopen in container after dependency or toolchain updates - Reopen in container after dependency or toolchain updates
- Keep local Docker Desktop running before opening the container - Keep local Docker Desktop running before opening the container
## Running Nx Targets From the Workspace
From the repository root (inside the container terminal), run Nx targets with the package manager wrapper.
Common examples:
- `pn nx test <project>`
- `pn nx build <project>`
You can replace `<project>` with any workspace project name, for example `core`, `content-services`, or `process-services-cloud`.
Tip: to discover available projects and targets, run `pn nx show projects` and inspect each project's `project.json` (or workspace configuration).
## Git Operations and Signing ## Git Operations and Signing
You can use Git inside the container, outside the container, or split responsibilities for better key safety. You can use Git inside the container, outside the container, or split responsibilities for better key safety.
+1 -1
View File
@@ -22,7 +22,7 @@ module.exports = function (config) {
{ pattern: 'lib/core/src/lib/viewer/assets/fake-test-file.txt', included: false, served: true, watched: false }, { pattern: 'lib/core/src/lib/viewer/assets/fake-test-file.txt', included: false, served: true, watched: false },
{ pattern: 'lib/core/src/lib/viewer/assets/fake-test-video.mp4', included: false, served: true, watched: false }, { pattern: 'lib/core/src/lib/viewer/assets/fake-test-video.mp4', included: false, served: true, watched: false },
{ {
pattern: 'lib/core//viewer/assets/fake-test-password-file.pdf', pattern: 'lib/core/src/lib/viewer/assets/fake-test-password-file.pdf',
included: false, included: false,
served: true, served: true,
watched: false watched: false