-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (25 loc) · 768 Bytes
/
Makefile
File metadata and controls
30 lines (25 loc) · 768 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
IMAGE_NAME:=cypress-test-task
CONTAINER_NAME:=cypress-tests
build:
docker build -t cypress-test-task .
run-tests:
docker run -dt --name ${CONTAINER_NAME} ${IMAGE_NAME} cat
docker exec tests /bin/sh -c \
cd tests; \
yarn test:all
run-ui-tests:
docker run -dt --name ${CONTAINER_NAME} ${IMAGE_NAME} cat
docker exec ${CONTAINER_NAME} /bin/sh -c \
cd tests; \
yarn test:ui:headless:mocha; \
docker cp ${CONTAINER_NAME}:cypress/reports/ ./cypress/reports
run-api-tests:
docker run -dt --name ${CONTAINER_NAME} ${IMAGE_NAME} cat
docker exec tests /bin/sh -c \
cd tests; \
yarn test:api:mocha; \
docker cp ${CONTAINER_NAME}:cypress/reports/ ./cypress/reports
clean:
docker stop ${CONTAINER_NAME}
docker rm ${CONTAINER_NAME}
docker rmi -f ${IMAGE_NAME}