image: "ruby:2.1" services: - mysql:latest - postgres:latest - redis:latest cache: key: "ruby21" paths: - vendor variables: MYSQL_ALLOW_EMPTY_PASSWORD: "1" before_script: - source ./scripts/prepare_build.sh - ruby -v - which ruby - gem install bundler --no-ri --no-rdoc - cp config/gitlab.yml.example config/gitlab.yml - touch log/application.log - touch log/test.log - bundle install --without postgres production --jobs $(nproc) "${FLAGS[@]}" - RAILS_ENV=test bundle exec rake db:drop db:create db:schema:load db:migrate stages: - test - notifications rubocop: stage: test script: - bundle exec rubocop tags: - ruby - mysql notify:slack: stage: notifications script: - ./scripts/notify_slack.sh "#ci-test" "Build failed! Check https://gitlab.com/gitlab-org/$(basename „$PWD)/commit/$CI_BUILD_REF/builds" when: on_failure