Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 41 additions & 39 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,51 @@
version: 2.0
version: 2.1

commands:
run-tests:
description: Install dependencies, load db and run tests
steps:
- checkout
- run: bundle install --path vendor/bundle
- run: bundle exec rake db:create db:schema:load
- run: rake

executors:
docker-ruby:
parameters:
tag:
type: string
docker:
- image: circleci/ruby:<< parameters.tag >>
- image: circleci/postgres:9.4.12-alpine

workflows:
ruby-test:
jobs: # run test suite concurrently on different versions of Ruby
- ruby-2-2
- ruby-2-3
- ruby-2-4

jobs:
"ruby-2.2":
docker:
- image: circleci/ruby:2.2-node
- image: circleci/postgres:9.4.12-alpine
ruby-2-2:
executor:
name: docker-ruby
tag: "2.2-node"
working_directory: ~/circleci-demo-workflows
steps:
- checkout
- run: bundle install --path vendor/bundle
- run: bundle exec rake db:create db:schema:load
- run:
name: Run tests
command: rake
- run-tests

"ruby-2.3":
docker:
- image: circleci/ruby:2.3-node
- image: circleci/postgres:9.4.12-alpine
ruby-2-3:
executor:
name: docker-ruby
tag: "2.3-node"
working_directory: ~/circleci-demo-workflows
steps:
- checkout
- run: bundle install --path vendor/bundle
- run: bundle exec rake db:create db:schema:load
- run:
name: Run tests
command: rake
- run-tests

"ruby-2.4":
docker:
- image: circleci/ruby:2.4-node
- image: circleci/postgres:9.4.12-alpine
ruby-2-4:
executor:
name: docker-ruby
tag: "2.4-node"
working_directory: ~/circleci-demo-workflows
steps:
- checkout
- run: bundle install --path vendor/bundle
- run: bundle exec rake db:create db:schema:load
- run:
name: Run tests
command: rake

workflows:
version: 2
build:
jobs:
- "ruby-2.2"
- "ruby-2.3"
- "ruby-2.4"
- run-tests
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- run-tests
- run-tests