Skip to content

Instantly share code, notes, and snippets.

@croaky
Created July 31, 2013 18:25
Show Gist options
  • Save croaky/6124717 to your computer and use it in GitHub Desktop.
Save croaky/6124717 to your computer and use it in GitHub Desktop.
This is our current Travis configuration for our standard Rails 4 + Ruby 2 projects that have Capybara Webkit test suites and Postgres databases. It relies on the bundle_cache.rb and bundle_install.sh files from http://randomerrata.com/post/45827813818/travis-s3 to cache gem bundles for much faster test suite setup time.
---
rvm:
- 2.0.0
before_install:
- "echo 'gem: --no-document' > ~/.gemrc"
- "echo '--colour' > ~/.rspec"
- gem install fog
- "./script/travis/bundle_install.sh"
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
before_script:
- cp .sample.env .env
- psql -c 'create database "project-name_test";' -U postgres
- bundle exec rake db:migrate db:test:prepare
after_script:
- "ruby script/travis/bundle_cache.rb"
bundler_args:
--without development staging production --path=~/.bundle
script:
- bundle exec rake spec
notifications:
campfire:
rooms:
thoughtbot:
- 123abc@123abc
on_success:
- always
on_failure:
- always
template:
- '(%{branch} - %{author}): %{message} - %{build_url}'
env:
global:
- BUNDLE_ARCHIVE="project-name"
- AWS_S3_BUCKET="company-name-travis-bundles"
- RAILS_ENV=test
- secure: 123abc+123abc+123abc/0=
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment