Skip to content

Instantly share code, notes, and snippets.

@isabelatravaglia
Last active May 25, 2021 10:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isabelatravaglia/cd61fd935531bc7e88b2a1f91186d417 to your computer and use it in GitHub Desktop.
Save isabelatravaglia/cd61fd935531bc7e88b2a1f91186d417 to your computer and use it in GitHub Desktop.
GHA test workflow - docker-compose using the images built with Dockerfiles
version: '3.8'
services:
test:
image: ${TEST_IMAGE_TAG:-test}
depends_on:
- database
- chrome
environment:
HUB_URL: http://chrome:4444/wd/hub
PARALLEL_WORKERS: 1 # makes tests run sequentially instead of simultaneously
command: >
bash -c "rails test && rails test:system"
database:
image: ${DB_IMAGE_TAG:-db}
restart: unless-stopped
ports:
- 5432:5432
environment:
POSTGRES_PASSWORD: postgres
chrome:
image: ${CHROME_IMAGE_TAG:-chrome}
ports:
- 4444:4444
- 5900:5900
volumes:
- /dev/shm:/dev/shm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment