Advertisement
Guest User

Untitled

a guest
Jun 15th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. image: "ruby:2.4"
  2. services:
  3. - postgres:latest
  4. - justinribeiro/chrome-headless:latest
  5. variables:
  6. POSTGRES_DB: test_db
  7. POSTGRES_USER: runner
  8. POSTGRES_PASSWORD: ""
  9.  
  10. .cache_bundler: &cache_bundler
  11. cache:
  12. untracked: true
  13. key: "$CI_BUILD_REF_NAME"
  14. paths:
  15. - cache/bundler/
  16.  
  17. .setup_test_env: &setup_test_env
  18. before_script:
  19. - bundle install --path=cache/bundler --without production --jobs $(nproc) "${FLAGS[@]}"
  20.  
  21. before_script:
  22. - apt-get update -qq && apt-get install -y -qq postgresql postgresql-contrib libpq-dev cmake
  23.  
  24. - ruby -v
  25. - which ruby
  26. - node -v
  27. - gem install bundler --no-ri --no-rdoc
  28. - RAILS_ENV=test bundle install --jobs $(nproc) "${FLAGS[@]}" --path /vendor/bundle
  29. - cp config/database.yml.gitlab config/database.yml
  30. - cp config/application.yml.gitlab config/application.yml
  31. - RAILS_ENV=test bundle exec rake db:create db:schema:load
  32.  
  33. rspec:
  34. <<: *cache_bundler
  35. <<: *setup_test_env
  36. script:
  37. - RAILS_ENV=test bundle exec rake test
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement