mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-07-21 21:52:53 +00:00
Run NPM in standalone container and use working_dir properly
Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
This commit is contained in:
+11
-10
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user