image: ruby:2.1.10

variables:
  RACK_ENV: "test"
  RAILS_ENV: "test"
  MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
  SSH_AUTH_SOCK: "/ssh-agent"

before_script:
  - echo "Europe/Berlin" | tee /etc/timezone
  - dpkg-reconfigure --frontend noninteractive tzdata
  - mkdir -p /root/.ssh && ssh-keyscan -H codevault.io > /root/.ssh/known_hosts 2>/dev/null
  - bundle config jobs 8
  - bundle install --path=/tmp/bundler --quiet

rubocop:
  script:
    - bundle exec rubocop