This repository has been archived by the owner on Feb 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
executable file
·28 lines (21 loc) · 1.22 KB
/
run.sh
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
#!/bin/bash
# Spins up the dev site and runs functional & visual inside a docker compose netowkr.
# Avoid "Mount denied" errors for Chrome/Firefox containers on Windows
# See https://github.com/docker/for-win/issues/1829#issuecomment-376328022
export COMPOSE_CONVERT_WINDOWS_PATHS=1
export COMPOSE_PROJECT_NAME=tophat
# Delete existing docker outputted error shots as we'll copy any new ones out
mkdir -p docker-output/screenshots/taken docker-output/screenshots/diff docker-output/errorShots
rm -rf docker-output/screenshots/taken/* docker-output/screenshots/diff/* docker-output/errorShots/*
# Clean up before starting containers
docker-compose down && docker-compose rm -vf
docker-compose build && docker-compose up -d
docker-compose run tests npm run test:visual -- wdio.docker.conf.js --host hub
docker-compose run tests npm run test:functional -- wdio.docker.conf.js --host hub
# Browserstack local not working in Docker container
#docker-compose run tests npm run test:browserstack -- --host hub
docker-compose logs --no-color > ./docker-output/logs.txt
# Uncomment this line to run commands in the tests container - useful for debugging
#winpty docker exec -it tophat_tests bash
# Clean up - removed named volumes
docker-compose down