Skip to content

Commit

Permalink
chore: allow test command to be customised in mysql container
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Dec 2, 2020
1 parent 249fe1c commit acee8ce
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docker-compose-ci-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
ports:
- "3306:3306"

mysql-tests:
tests:
build: .
depends_on:
- mysql
Expand All @@ -32,5 +32,6 @@ services:
- ./.rubocop:/home/.rubocop
- ./.gitignore:/home/.gitignore
- ./public:/home/public
- ./script/docker-container/test.sh:/usr/local/bin/test
entrypoint: dockerize
command: --wait tcp://mysql:3306 -timeout 60s test
3 changes: 3 additions & 0 deletions script/docker-container/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

bundle exec rake
2 changes: 1 addition & 1 deletion script/test/run-rake-on-docker-compose-mysql.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ cleanup() {
}

trap cleanup EXIT
docker-compose -f docker-compose-ci-mysql.yml up --exit-code-from mysql-tests --abort-on-container-exit --remove-orphans
docker-compose -f docker-compose-ci-mysql.yml up --exit-code-from tests --abort-on-container-exit --remove-orphans

0 comments on commit acee8ce

Please sign in to comment.