Files
trezor-suite/docker/docker-compose.suite-test.yml

48 lines
1.7 KiB
YAML

services:
trezor-user-env-unix:
image: ghcr.io/trezor/trezor-user-env:b3b12fac7bcb069ebcb8f29135e5baae73af722d
environment:
- DISPLAY=$DISPLAY
- QT_X11_NO_MITSHM=1
- LOCAL_USER_ID=$LOCAL_USER_ID
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:rw
suite-dev:
extends:
file: docker-compose.suite-dev.yml
service: suite-dev
network_mode: service:trezor-user-env-unix
test-open:
# the Docker image to use from https://github.com/cypress-io/cypress-docker-images
build:
context: .
dockerfile: ./test-runner/Dockerfile
container_name: test-runner
ipc: host
depends_on:
- suite-dev
- trezor-user-env-unix
network_mode: service:trezor-user-env-unix
environment:
- CYPRESS_SNAPSHOT=$CYPRESS_SNAPSHOT
- CYPRESS_updateSnapshots=$CYPRESS_updateSnapshots
- CYPRESS_baseUrl=http://localhost:8000
# on dev server, due to on-demand compilation nature of next.js, we need much longer timeout
- CYPRESS_defaultCommandTimeout=60000
# typical test should be using bridge from trezor-user-env. some special test cases (firmware update related) have mocked bridge
# todo: set this option dynamically based on test case
- CYPRESS_USE_TREZOR_USER_ENV_BRIDGE=1
- DISPLAY=$DISPLAY
- QT_X11_NO_MITSHM=1
- LOCAL_USER_ID=$LOCAL_USER_ID
working_dir: /e2e
command: bash -c "docker/wait-for-200.sh http://localhost:8000 && cypress open --project /e2e/packages/suite-web/e2e"
volumes:
- ../:/e2e
- /tmp/.X11-unix:/tmp/.X11-unix:rw
bitcoin-regtest:
image: ghcr.io/trezor/trezor-user-env-regtest # this is a special image that runs regtest and blockbook
network_mode: service:trezor-user-env-unix