.gitlab-ci.yml
image: "ruby:2.4-stretch"
services:
- postgres:latest
variables:
RAILS_ENV: test
POSTGRES_DB: test_db
POSTGRES_USER: runner
POSTGRES_PASSWORD: ""
before_script:
- apt-get update -qq && apt-get install -y -qq sqlite3 libsqlite3-dev nodejs postgresql chromedriver
- gem install bundler --no-ri --no-rdoc
- bundle install --jobs $(nproc) "${FLAGS[@]}"
- cp config/database.yml.gitlab config/database.yml
- bundle exec rake db:create
- bundle exec rake db:migrate
# Cache gems in between builds
cache:
paths:
- vendor/ruby
rspec:
script:
- bundle exec rspec