Continuous Integration with Rails, Github and TravisCI

After 25 failing builds I finally managed it! My app works just fine with continuous integration provided by Travis CI.

Here my travis config using postgresql for test environment:

language: ruby

sudo: false

  - gem install bundler
  - "rm ${BUNDLE_GEMFILE}.lock"

cache: bundler

 - 2.3.1

 - DB=pgsql

 - postgresql

  adapter: postgresql
  database: ycms_test #(replace this with your database name)

# uncomment and edit the following line if your project needs to run something other than `rake`:
# script: 
# - bundle exec rspec spec

 - cp config/database.yml.travis config/database.yml
 - psql -c 'create database ycms_test;' -U postgres # replace it here aswell
 - bundle update
 - bundle exec rake db:test:prepare

Happy testing!

Published by


Hello! My name is Anton. I am a passionate project manager who loves digging deep into code. You can check my Github and CodeEval. Hopefully my thoughts on management can lead you to one or another good idea.