Advertisement
Guest User

Untitled

a guest
Aug 13th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. version: 2
  2. jobs:
  3. build:
  4. working_directory: ~/mowers
  5. docker:
  6. - image: circleci/ruby:2.4.1-node
  7. environment:
  8. PGHOST: 127.0.0.1
  9. PGUSER: mower
  10. RAILS_ENV: test
  11. - image: circleci/postgres:9.6.3-alpine
  12. environment:
  13. POSTGRES_USER: mower
  14. POSTGRES_DB: mowers_test
  15. POSTGRES_PASSWORD: ""
  16. steps:
  17. - checkout
  18.  
  19. - restore_cache:
  20. keys:
  21. - gem-cache-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
  22. - gem-cache-{{ .Branch }}
  23. - gem-cache
  24.  
  25. - run: bundle install --path vendor/bundle
  26.  
  27. - save_cache:
  28. key: gem-cache-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
  29. paths:
  30. - vendor/bundle
  31.  
  32. - restore_cache:
  33. keys:
  34. - yarn-cache-{{ .Branch }}-{{ checksum "yarn.lock" }}
  35. - yarn-cache-{{ .Branch }}
  36. - yarn-cache
  37.  
  38. - run: yarn install
  39.  
  40. - save_cache:
  41. key: yarn-cache-{{ .Branch }}-{{ checksum "yarn.lock" }}
  42. paths:
  43. - node_modules
  44.  
  45. - run:
  46. name: Wait for DB
  47. command: dockerize -wait tcp://localhost:5432 -timeout 1m
  48.  
  49. - run:
  50. name: Database setup
  51. command: bin/rails db:schema:load --trace
  52.  
  53. - run:
  54. name: Run rspec
  55. command: |
  56. bundle exec rspec --profile 10 \
  57. --format progress
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement