forked from rubyforgood/Flaredown
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
54 lines (45 loc) · 1.56 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
language: ruby
env:
global:
- NODE_ENV=development
- PHANTOMJS_VERSION=2.1.1
- FIX_TRAVIS="fix those specs"
cache:
directories:
- frontend/bower_components
- frontend/node_modules
- backend/vendor/bundle
rvm:
- 2.3.1
addons:
postgresql: '9.4'
services:
- redis-server
- mongodb
before_install:
- 'echo "gem: --no-ri --no-rdoc" > ~/.gemrc'
install:
- 'gem update bundler'
- 'cd frontend'
- 'nvm i 6.10.3'
- 'nvm use 6.10.3'
- 'npm i'
- 'npm install -g bower'
- 'bower install'
- 'cd ../backend'
- 'bundle install --without production --jobs 3 --retry 3 --deployment'
- 'export PATH=$PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64/bin:$PATH'
- 'if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then rm -rf $PWD/travis_phantomjs; mkdir -p $PWD/travis_phantomjs; fi'
- 'if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then wget https://github.com/Medium/phantomjs/releases/download/v$PHANTOMJS_VERSION/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -O $PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2; fi'
- 'if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then tar -xvf $PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -C $PWD/travis_phantomjs; fi'
before_script:
- 'export $(grep -v "#" env-example | xargs) PG_DATABASE_USERNAME=travis'
- 'bundle exec rake db:create'
- 'bundle exec rake db:structure:load'
script:
- bundle exec rspec
- bundle exec rubocop
- cd ../frontend
- echo "node env $NODE_ENV"
- npm version
- npm run test