Skip to content

Commit

Permalink
Use Travis CI and github integration
Browse files Browse the repository at this point in the history
- Free for public repositories
- Need to set secret key base (copy travis specific file)
- Also copying a database.yml file so that local credentials can be
  different
- Needed to Update uglifier
  * Travis build bundle audit alerted me to this issue:
  * mishoo/UglifyJS#751
- Could leave off the rvm ruby version and let it use the
  `.ruby-version` file, but this is a beta feature (warning printed)
  • Loading branch information
AdrianCann committed Nov 1, 2015
1 parent 0ebea54 commit 2531412
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 21 deletions.
32 changes: 14 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
before_install:
- "echo '--colour' > ~/.rspec"
- "echo 'gem: --no-document' > ~/.gemrc"
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
install:
- bin/setup
language: ruby
cache: bundler
rvm:
- 2.2.2
branches:
only:
- master
cache:
- bundler
language:
- ruby
notifications:
email: false
rvm:
- 2.2.2
addons:
postgresql: "9.3"
sudo: false
services:
- postgresql
before_script:
- export DISPLAY=:99
- sh -e /etc/init.d/xvfb start
- sleep 3
- cp config/secrets.yml.travis config/secrets.yml
- cp config/database.yml.travis config/database.yml
- psql -c 'create database travis_ci_test;' -U postgres
- bin/rake db:create db:schema:load
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ gem "refills"
gem "sass-rails", "~> 5.0"
gem "simple_form"
gem "title"
gem "uglifier"
gem "uglifier", ">= 2.7.2"
gem "unicorn"

group :development do
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ GEM
rails (>= 3.1)
tzinfo (1.2.2)
thread_safe (~> 0.1)
uglifier (2.7.1)
uglifier (2.7.2)
execjs (>= 0.3.0)
json (>= 1.8.0)
unicorn (4.9.0)
Expand Down Expand Up @@ -328,7 +328,7 @@ DEPENDENCIES
spring-commands-rspec
timecop
title
uglifier
uglifier (>= 2.7.2)
unicorn
web-console

Expand Down
4 changes: 4 additions & 0 deletions config/database.yml.travis
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
test:
adapter: postgresql
database: travis_ci_test
username: postgres
2 changes: 2 additions & 0 deletions config/secrets.yml.travis
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
test:
secret_key_base: 3a6a5b5dffbb0c58391a6d88651656ddfdac09a97b5e88f1eca4af24b5ce41580d9612f53e5226b797c426f5c9ad82bbf3bf4bd7933e33c3f0

0 comments on commit 2531412

Please sign in to comment.