File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change
1
+ version : ' 3.2'
2
+
3
+ services :
4
+ # ############################################
5
+ # Start app as a container
6
+ # ############################################
7
+ web :
8
+ # if not --build and kursplan-api already exists in
9
+ # your local computers registry 'image' is used.
10
+ image : $LOCAL_IMAGE_ID
11
+
12
+ # Since we do not want to add tests to our
13
+ # production image. We mount the catalog
14
+ # 'test' on in the repo on your local machine
15
+ # to /application on the inside of the container.
16
+ # The volume mount is done at startup.
17
+ volumes :
18
+ - ./test:/application/test
19
+
20
+ tty : true
21
+
22
+ # The unit test command that triggers tests to be run
23
+ # inside the container
24
+ command : ['sh', '-c', 'npm install --development && npm test']
Original file line number Diff line number Diff line change 15
15
"vendor" : " parcel build ./public/js/vendor.js" ,
16
16
"test" : " jest --forceExit" ,
17
17
"test:watch" : " jest --watch" ,
18
+ "test-unit-in-docker" : " ID=$(docker build -q .) && LOCAL_IMAGE_ID=$ID docker-compose -f docker-compose-unit-tests.yml up --abort-on-container-exit --always-recreate-deps" ,
18
19
"docker" : " npm install --development && npm run build && npm prune --production" ,
19
20
"build" : " NODE_ENV=production rm -rf dist && parcel build ./public/js/app/app.jsx && npm run vendor --preserve-comments" ,
20
21
"build-dev" : " cross-env NODE_ENV=development rm -rf dist && parcel build ./public/js/vendor.js --public-url /kurs-pm/static && parcel watch ./public/js/app/app.jsx --public-url /kurs-pm/static" ,
You can’t perform that action at this time.
0 commit comments