Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: 2
- jobs:
- build:
- working_directory: ~/mowers
- docker:
- - image: circleci/ruby:2.4.1-node
- environment:
- PGHOST: 127.0.0.1
- PGUSER: mower
- RAILS_ENV: test
- - image: circleci/postgres:9.6.3-alpine
- environment:
- POSTGRES_USER: mower
- POSTGRES_DB: mowers_test
- POSTGRES_PASSWORD: ""
- steps:
- - checkout
- - restore_cache:
- keys:
- - gem-cache-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
- - gem-cache-{{ .Branch }}
- - gem-cache
- - run: bundle install --path vendor/bundle
- - save_cache:
- key: gem-cache-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
- paths:
- - vendor/bundle
- - restore_cache:
- keys:
- - yarn-cache-{{ .Branch }}-{{ checksum "yarn.lock" }}
- - yarn-cache-{{ .Branch }}
- - yarn-cache
- - run: yarn install
- - save_cache:
- key: yarn-cache-{{ .Branch }}-{{ checksum "yarn.lock" }}
- paths:
- - node_modules
- - run:
- name: Wait for DB
- command: dockerize -wait tcp://localhost:5432 -timeout 1m
- - run:
- name: Database setup
- command: bin/rails db:schema:load --trace
- - run:
- name: Run rspec
- command: |
- bundle exec rspec --profile 10 \
- --format progress
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement