-
Notifications
You must be signed in to change notification settings - Fork 0
/
cy-open.yml
31 lines (30 loc) · 1.34 KB
/
cy-open.yml
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
31
version: '3.2'
# run web application and open Cypress Test Runner in a Docker container
# but send the X11 output to the server running on the host machine
# so you can see and interact with the tests. Most services are configured
# in the file docker-compose.yml, this file only overrides variables
# necessary for "cypress open" to work with X11.
# We need to use both file names to run:
#
# docker-compose -f docker-compose.yml -f cy-open.yml up --exit-code-from cypress
#
services:
cypress:
# pass custom command to start Cypress otherwise it will use the entrypoint
# specified in the Cypress Docker image.
# also pass "--project <folder>" so that when Cypress opens
# it can find file "cypress.json" and show integration specs
# https://on.cypress.io/command-line#cypress-open
entrypoint: cypress open --project /e2e
environment:
# get the IP address of the host machine and allow X11 to accept
# incoming connections from that IP address
# IP=$(ipconfig getifaddr en0)
# /usr/X11/bin/xhost + $IP
# then pass the environment variable DISPLAY to show Cypress GUI on the host system
# DISPLAY=$IP:0
- DISPLAY
volumes:
# for Cypress to communicate with the X11 server pass this socket file
# in addition to any other mapped volumes
- /tmp/.X11-unix:/tmp/.X11-unix