Run NPM in standalone container and use working_dir properly

Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
This commit is contained in:
Pablo Zmdl
2026-07-01 15:07:48 +02:00
parent 2f8df05f32
commit 6589878dc6
+11 -10
View File
@@ -65,11 +65,18 @@ services:
working_dir: /app
command: node php/tests/desec-mock.mjs 8090 2>&1
npm-installer:
image: docker.io/library/node:latest
volumes:
- ..:/app
working_dir: /app/tests
command: npm ci --omit=optional
test-runner-base:
image: mcr.microsoft.com/playwright:v1.56.1
volumes:
- ..:/app
working_dir: /app
working_dir: /app/tests
ports:
- '9323:9323' # to view test reports
profiles:
@@ -77,20 +84,14 @@ services:
depends_on:
desec-mock:
condition: service_started
npm-installer:
condition: service_completed_successfully
environment:
BASE_URL: "https://nextcloud-aio-mastercontainer:8080"
DEBUG: "pw:api"
CI: "true"
DESEC_MOCK_URL: "http://desec-mock:8090"
command: |-
bash -c "
cd tests
# Install dependencies
npm ci --omit=optional
# Run the initial setup tests
npx playwright test "${TESTS_FILE-}"
exit $?
"
command: npx playwright test "${TESTS_FILE-}"
test-runner-code-from-image:
extends: test-runner-base