-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
33 lines (30 loc) · 1.2 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
env:
global:
- CC_TEST_REPORTER_ID=e6f123c837b138a2d1408891c4355c8013568887ae04be75f5912e049600ad24
services:
- docker
language: ruby
cache:
- bundler: true
- directories:
- /home/travis/.rvm/
rvm:
- 2.1
before_install:
- docker build -t flack .
- docker run -d flack:latest /bin/sh -c "cd flack/ ; make serve"
- CONTAINER=`docker ps -aql`
- CONTAINER_IP=`docker inspect $CONTAINER | grep '"IPAddress"' | head -n 1 | grep -oE "([0-9]{1,3}\.){3}[0-9]{1,3}"`
- ip addr
- HOST_IP=`ip a s ens4 | egrep -o 'inet [0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | cut -d' ' -f2`
- docker exec $CONTAINER sed -i "s#:\/\/localhost#:\/\/$HOST_IP#g" /flack/envs/dev/lib/taskers/web/tasker.rb
before_script:
- bundle exec rake app:floristry:setup_dummy
- sed -i "s/localhost/$CONTAINER_IP/g" spec/dummy/rails_app/config/initializers/floristry.rb
- bundle exec ./spec/dummy/rails_app/bin/rails server -d
# - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
# - chmod +x ./cc-test-reporter
# - ./cc-test-reporter before-build
script: bundle exec rspec
#after_script:
# - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT