diff options
author | Tom Parker-Shemilt <palfrey@tevp.net> | 2019-12-28 23:10:51 +0000 |
---|---|---|
committer | Tom Parker-Shemilt <palfrey@tevp.net> | 2019-12-28 23:10:51 +0000 |
commit | ffb5de97b95be9781a3fb4b70d778993b8c8c1e0 (patch) | |
tree | f24001c7b5a0441d385db74671af31d19d0b3092 | |
parent | a3bbcfe3ebd61694304ef5c085a65dadbfa8e206 (diff) |
Redo Travis testing in a script
-rw-r--r-- | .travis.yml | 7 | ||||
-rwxr-xr-x | test.sh | 15 |
2 files changed, 16 insertions, 6 deletions
diff --git a/.travis.yml b/.travis.yml index 064325f..cdf8b48 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,9 +5,4 @@ services: - docker script: - - docker-compose up --build& || travis_terminate 1 - - curl https://raw.githubusercontent.com/vishnubob/wait-for-it/9995b721327eac7a88f0dce314ea074d5169634f/wait-for-it.sh -o wait-for-it.sh || travis_terminate 1 - - chmod +x wait-for-it.sh || travis_terminate 1 - - ./wait-for-it-sh localhost:3000 --timeout=0 || travis_terminate 1 - - curl -v http://localhost:3000/ || travis_terminate 1 - - curl -v http://localhost:3000/new/event/public || travis_terminate 1
\ No newline at end of file + - ./test.sh
\ No newline at end of file @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +set -eux -o pipefail + +cleanup() { + docker-compose kill +} +trap cleanup 0 + +docker-compose up --build & + +while [[ "$(curl -s -o /dev/null -w "%{http_code}" http://localhost:3000/)" -ne "200" ]]; do sleep 5; done +curl -v http://localhost:3000/new/event/public + +cleanup
\ No newline at end of file |