Created
June 20, 2017 08:23
-
-
Save almaron/cbb0f987988c082e2f34565f98b01b71 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.use-docker: &use-docker | |
image: docker:latest | |
variables: | |
DOCKER_DRIVER: overlay | |
services: | |
- docker:dind | |
before_script: | |
- docker login -u $CI_BUILD_USER -p $CI_BUILD_TOKEN registry.gitlab.com | |
- echo $CI_BUILD_REF >> REVISION | |
run tests: | |
<<: *use-docker | |
image: ruby:2.4-alpine | |
services: | |
- postgres:9.6-alpine | |
variables: | |
RAILS_ENV: test | |
DB_HOST: postgres | |
before_script: | |
- apk add --update git libpq nodejs | |
- cp config/secrets.example.yml config/secrets.yml | |
- apk --update add --virtual build_deps build-base ruby-dev postgresql-dev libxml2-dev libxslt-dev | |
- bundle install --without production development --path /cache/vendor | |
- bundle exec rake db:create db:test:prepare | |
- apk del build_deps | |
stage: test | |
script: | |
- bundle exec rubocop -l | |
- bundle exec rspec |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment