diff --git a/dockerfiles/Dockerfile-gui-tests b/dockerfiles/Dockerfile-gui-tests index 17bca6464..af1bb2aea 100644 --- a/dockerfiles/Dockerfile-gui-tests +++ b/dockerfiles/Dockerfile-gui-tests @@ -57,10 +57,6 @@ RUN apt-get install -y \ xdg-utils \ wget -# Install rust -RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y --default-toolchain nightly --no-modify-path --profile minimal -ENV PATH="/root/.cargo/bin:${PATH}" - RUN curl -sL https://nodejs.org/dist/v22.13.1/node-v22.13.1-linux-x64.tar.xz | tar -xJ ENV PATH="/node-v22.13.1-linux-x64/bin:${PATH}" ENV NODE_PATH="/node-v22.13.1-linux-x64/lib/node_modules/" @@ -69,13 +65,13 @@ WORKDIR /build RUN mkdir out +COPY ../package.json /build/package.json + # For now, we need to use `--unsafe-perm=true` to go around an issue when npm tries # to create a new folder. For reference: # https://github.com/puppeteer/puppeteer/issues/375 # # We also specify the version in case we need to update it to go around cache limitations. -RUN npm install -g browser-ui-test@0.21.1 --unsafe-perm=true - -EXPOSE 3000 +RUN npm install --unsafe-perm=true --loglevel verbose --force CMD ["node", "/build/out/gui-tests/tester.js"] diff --git a/dockerfiles/run-gui-tests.sh b/dockerfiles/run-gui-tests.sh index 133368fe2..4b2e82cd8 100755 --- a/dockerfiles/run-gui-tests.sh +++ b/dockerfiles/run-gui-tests.sh @@ -32,11 +32,12 @@ fi . .env +set +e # We disable the "exit right away if command failed" setting. cargo run -- start-web-server & SERVER_PID=$! # status="docker run . -v `pwd`:/build/out:ro gui_tests" -docker compose run gui_tests +docker compose run --rm gui_tests status=$? kill $SERVER_PID exit $status diff --git a/package.json b/package.json new file mode 100644 index 000000000..c22d32770 --- /dev/null +++ b/package.json @@ -0,0 +1,6 @@ +{ + "name": "deps", + "dependencies": { + "browser-ui-test": "^0.21.3" + } +}