Skip to content

Instantly share code, notes, and snippets.

@aarongough
Created September 15, 2017 18:57
Show Gist options
  • Save aarongough/71a26c0537e795998460b6ee982dd262 to your computer and use it in GitHub Desktop.
Save aarongough/71a26c0537e795998460b6ee982dd262 to your computer and use it in GitHub Desktop.
version: 2
jobs:
docker_config: &docker_config
- image: circleci/ruby:2.3.4
environment:
RAILS_ENV: test
- image: circleci/mysql:5.6
environment:
MYSQL_DATABASE: circle_test
MYSQL_HOST: 127.0.0.1
checkout_code: &checkout_code
- type: cache-restore
key: v1-repo
- checkout
- type: cache-save
key: v1-repo
paths:
- ~/project
test_project_1:
docker:
- *docker_config
steps:
- *checkout_code
- run: cd project1 && bundle exec rspec
test_project_2:
docker:
- *docker_config
steps:
- *checkout_code
- run: cd project2 && bundle exec rspec
test_project_3:
docker:
- *docker_config
steps:
- *checkout_code
- run: cd project3 && bundle exec rspec
workflows:
version: 2
test:
jobs:
- test_project_1
- test_project_2
- test_project_3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment