Skip to content
This repository has been archived by the owner on Dec 3, 2019. It is now read-only.

Commit

Permalink
less docker-in-docker action
Browse files Browse the repository at this point in the history
Configure Travis test run to use the PostgreSQL and Redis services
already available in the Travis CI environment.

Signed-off-by: Robb Kidd <[email protected]>
  • Loading branch information
robbkidd committed Oct 10, 2018
1 parent fb08dec commit 09a4c9b
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
# Since we build and test in Docker we dont
# need node at build time
language: c
sudo: false
language: ruby
bundler_args: "--without development --jobs 7"

services:
- docker
cache:
bundler: true

script:
- make build
- |
while ! psql --host=localhost --username=postgres -c 'SELECT 1'> /dev/null 2>&1; do
echo 'Waiting for postgres...'
sleep 1;
done;
- make test
- if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then make upgrade; fi
services:
- redis-server
- postgresql

env:
secure: "AmnH0r1tF9HIVsUfhoJHzCEqTZz3TU4FUd2D+T0XzSDbz6kUSubmP4agYRsJI1xPTwegqSonwL0QGAlaIKEssz6rqAqBSvzHC95XvghP1HVVp2/j8vvFaJbpWsnTQ25FbMgDD89wHRKRs0qk2Ui0zi+CtNFylj83D13yoVys6C0="
- secure: "AmnH0r1tF9HIVsUfhoJHzCEqTZz3TU4FUd2D+T0XzSDbz6kUSubmP4agYRsJI1xPTwegqSonwL0QGAlaIKEssz6rqAqBSvzHC95XvghP1HVVp2/j8vvFaJbpWsnTQ25FbMgDD89wHRKRs0qk2Ui0zi+CtNFylj83D13yoVys6C0="
- POSTGRES_HOST=localhost

before_script:
- psql -c 'create database operationcode_test;' -U postgres

script:
- bundle exec rails db:migrate RAILS_ENV=test
- bundle exec rake test
- bundle exec rubocop

0 comments on commit 09a4c9b

Please sign in to comment.