Skip to content

Instantly share code, notes, and snippets.

@bhoggard
Created October 5, 2018 01:28
Show Gist options
  • Save bhoggard/2e0996ed2dee0f3d105945988467f5aa to your computer and use it in GitHub Desktop.
Save bhoggard/2e0996ed2dee0f3d105945988467f5aa to your computer and use it in GitHub Desktop.
image: ruby:2.5.1
services:
- postgres:9.5
variables:
POSTGRES_DB: artcat_test
POSTGRES_USER: runner
# Cache gems in between builds
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- vendor/ruby
test:
stage: test
script:
- apt-get update -qy
- curl -sL https://deb.nodesource.com/setup_8.x | bash
- apt-get install -y build-essential nodejs
- bundle install --path vendor/bundle
- cp config/database.yml.gitlab config/database.yml
- bundle exec rails db:setup RAILS_ENV=test
- bundle exec rubocop
- bundle exec rake test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment