Skip to content
This repository was archived by the owner on Dec 3, 2019. It is now read-only.
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
less docker-in-docker action
Configure Travis test run to use the PostgreSQL and Redis services
already available in the Travis CI environment.

Signed-off-by: Robb Kidd <robb@thekidds.org>
  • Loading branch information
robbkidd committed Oct 10, 2018
commit 0bc63df9ea0043f3c044b70f7c930cdcd671e46c
30 changes: 16 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
# Since we build and test in Docker we dont
# need node at build time
language: c
sudo: false
language: ruby
bundler_args: "--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="

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