image: ruby:2.3.1

services:
  - postgres:latest

variables:
  POSTGRES_DB: wulin_app_test
  POSTGRES_USER: postgres
  POSTGRES_PASSWORD: ''

before_script:
  - apt-get update -qy
  - apt-get install -qy nodejs
  - apt-get install -qy libfontconfig1
  # - export PHANTOM_JS="phantomjs-2.1.1-linux-x86_64"
  # - wget https://bitbucket.org/ariya/phantomjs/downloads/$PHANTOM_JS.tar.bz2 --referer=https://bitbucket.org -P /cache/
  # - tar xjf /cache/$PHANTOM_JS.tar.bz2 -C /cache
  # - mv /cache/$PHANTOM_JS /usr/local/share
  # - ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin
  - export PHANTOM_JS_VERSION="2.1.1"
  - wget https://github.com/paladox/phantomjs/archive/v$PHANTOM_JS_VERSION.tar.gz -P /cache/phantomjs/
  - tar vxzf /cache/phantomjs/v$PHANTOM_JS_VERSION.tar.gz -C /cache
  - mv /cache/phantomjs-$PHANTOM_JS_VERSION /usr/local/share
  - ln -sf /usr/local/share/phantomjs-$PHANTOM_JS_VERSION/bin/phantomjs /usr/local/bin
  - gem install bundler
  - cp spec/wulin_app/config/database.ci.yml spec/wulin_app/config/database.yml
  - bundle install --path /cache

test:
  script:
    - bundle exec rspec
    - bundle exec cucumber

image: ruby:2.3.1

services:
  - postgres:latest

variables:
  POSTGRES_DB: wulin_app_test
  POSTGRES_USER: postgres
  POSTGRES_PASSWORD: ''

before_script:
  - apt-get update -qy
  - apt-get install -qy nodejs
  - apt-get install -qy libfontconfig1
  - export PHANTOM_JS_VERSION="2.1.1"
  - wget -q https://github.com/paladox/phantomjs/archive/v$PHANTOM_JS_VERSION.tar.gz -P /cache/phantomjs/
  - tar xzf /cache/phantomjs/v$PHANTOM_JS_VERSION.tar.gz -C /cache
  - mv /cache/phantomjs-$PHANTOM_JS_VERSION /usr/local/share
  - ln -sf /usr/local/share/phantomjs-$PHANTOM_JS_VERSION/bin/phantomjs /usr/local/bin
  - gem install bundler
  - cp spec/wulin_app/config/database.ci.yml spec/wulin_app/config/database.yml
  - bundle install --path /cache

test:
  script:
    - bundle exec rspec
    - bundle exec cucumber

Remove quiet/verbose flags in wget/tar
Remove quiet/verbose flags in wget/tar
