-
-
Save daniel-nelson/464b25ab6c2e53ddaaac6fd31aba49cd 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
version: 2 | |
jobs: | |
build: | |
working_directory: ~/platejoy | |
services: | |
- redis | |
docker: | |
- image: circleci/ruby:2.4.1-node | |
environment: | |
RAILS_ENV: test | |
PGHOST: 127.0.0.1 | |
PGUSER: root | |
- image: circleci/postgres:9.6.2-alpine | |
environment: | |
POSTGRES_USER: root | |
POSTGRES_DB: circle-test_test | |
steps: | |
- checkout | |
- run: | |
name: Install Qt | |
command: sudo apt-get update && sudo apt-get install qt5-default libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x | |
# Restore bundle cache | |
- restore_cache: | |
keys: | |
- rails-demo-{{ checksum "Gemfile.lock" }} | |
- rails-demo- | |
# Bundle install dependencies | |
- run: | |
name: Install dependencies | |
command: bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs 4 --retry 3 | |
- run: sudo apt install postgresql-client | |
- run: | |
name: Wait for Redis to receive connections | |
command: dockerize -wait tcp://localhost:6379 -timeout 1m | |
# Store bundle cache | |
- save_cache: | |
key: rails-demo-{{ checksum "Gemfile.lock" }} | |
paths: | |
- vendor/bundle | |
- run: | |
name: Database Setup | |
command: | | |
bundle exec rake db:create | |
bundle exec rake db:structure:load | |
- run: | |
name: Parallel RSpec | |
command: rake spec | |
# Save artifacts | |
- store_test_results: | |
path: /tmp/test-results |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment