-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcy-run.sh
22 lines (20 loc) · 831 Bytes
/
cy-run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash
echo "Running Cypress tests headlessly without copying files"
# explanation of the "docker run" command line arguments
#
# -it = interactive terminal
# -v $PWD:/e2e = map current folder to /e2e inside the container
# -w /e2e = set working directy to /e2e
# $@ = pass any arguments to this script to the Cypress command
# like "./cy-run.sh --record"
#
# Docker image "cypress/included:3.2.0" has its entrypoint
# set to "cypress run" by default
docker run -it -v $PWD:/integration -w /integration cypress/included:7.6.0 $@
# if you need to restrict amount of memory or CPU power the
# container can use, see
# https://docs.docker.com/config/containers/resource_constraints/
# restrict total memory
# --memory=600m --memory-swap=600m
# restrict CPU share
# --cpus=0.3