mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
chore: add Chromium installation for Karma tests and update devcontainer configuration
This commit is contained in:
@@ -8,6 +8,11 @@ ARG PNPM_VERSION=11.5.0
|
||||
ENV PNPM_HOME=/home/node/.local/share/pnpm
|
||||
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.
|
||||
RUN corepack enable \
|
||||
&& corepack prepare pnpm@${PNPM_VERSION} --activate \
|
||||
|
||||
@@ -47,7 +47,8 @@
|
||||
"CI": "true",
|
||||
"NODE_ENV": "development",
|
||||
"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"],
|
||||
|
||||
@@ -23,6 +23,19 @@ Typical day-to-day actions:
|
||||
- Reopen in container after dependency or toolchain updates
|
||||
- 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
|
||||
|
||||
You can use Git inside the container, outside the container, or split responsibilities for better key safety.
|
||||
|
||||
@@ -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-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,
|
||||
served: true,
|
||||
watched: false
|
||||
|
||||
Reference in New Issue
Block a user