From 6589878dc624861d6a4decbac3494da46e9f363c Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Wed, 1 Jul 2026 15:07:48 +0200 Subject: [PATCH] Run NPM in standalone container and use working_dir properly Signed-off-by: Pablo Zmdl --- php/tests/compose.yaml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/php/tests/compose.yaml b/php/tests/compose.yaml index 73de8e0f..937b8bb4 100644 --- a/php/tests/compose.yaml +++ b/php/tests/compose.yaml @@ -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