version: 2

.build_template: &build_definition
  steps:
    - checkout
    - run: bundle install
    - run: bundle exec rake rubocop
    - run: bundle exec rspec -r rspec_junit_formatter --format RspecJunitFormatter -o $CIRCLE_TEST_REPORTS/rspec/junit.xml
  working_directory: ~/app

jobs:
  build:
    <<: *build_definition
    docker:
      - image: ruby:2.5
  build_ruby2_4:
    <<: *build_definition
    docker:
      - image: ruby:2.4
  build_ruby2_3:
    <<: *build_definition
    docker:
      - image: ruby:2.3

workflows:
  version: 2
  build_ruby_versions:
    jobs:
      - build
      - build_ruby2_4
      - build_ruby2_3

version: 2

.build_template: &build_definition
  steps:
    - checkout
    - run: bundle install
    - run: bundle exec rake rubocop
    - run: bundle exec rspec -r rspec_junit_formatter --format RspecJunitFormatter -o $CIRCLE_TEST_REPORTS/rspec/junit.xml
  working_directory: ~/app

jobs:
  build_ruby2_6rc:
    <<: *build_definition
    docker:
      - image: ruby:2.6-rc
  build_ruby2_5:
    <<: *build_definition
    docker:
      - image: ruby:2.5
  build_ruby2_4:
    <<: *build_definition
    docker:
      - image: ruby:2.4
  build_ruby2_3:
    <<: *build_definition
    docker:
      - image: ruby:2.3

workflows:
  version: 2
  build_ruby_versions:
    jobs:
      - build_ruby2_6rc
      - build_ruby2_5
      - build_ruby2_4
      - build_ruby2_3

Add ruby 2.6rc to build jobs
feat: Add ruby 2.6rc to build jobs
