Skip to content
Snippets Groups Projects
Commit fd71c227 authored by Konrad Mohrfeldt's avatar Konrad Mohrfeldt :koala:
Browse files

tests: cache node_modules in docker-compose test runner

parent c45f2f8a
No related branches found
No related tags found
No related merge requests found
......@@ -4,3 +4,4 @@ RUN apt update -y && \
apt-get clean -y
USER pwuser
RUN mkdir /home/pwuser/app
RUN mkdir /home/pwuser/app/.npm
......@@ -119,6 +119,8 @@ services:
working_dir: /home/pwuser/app
user: pwuser
env_file: [env]
environment:
NPM_CI_ARGS: --cache .npm --prefer-offline
command:
- '-c'
- |
......@@ -128,6 +130,7 @@ services:
wait-for-it -t 0 -h "$TANK_HOST" -p "$TANK_PORT"
make test-local
volumes:
- npm_cache:/home/pwuser/app/.npm
- ../public/:/home/pwuser/app/public/
- ../src/:/home/pwuser/app/src/
- ../tests/:/home/pwuser/app/tests/
......@@ -149,3 +152,6 @@ services:
- ../tsconfig.json:/home/pwuser/app/tsconfig.json
- ../vite.config.ts:/home/pwuser/app/vite.config.ts
- ../vitest.config.ts:/home/pwuser/app/vitest.config.ts
volumes:
npm_cache:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment