# To update the build configuration, edit the "builds" array below and run: # erb .circleci/config.yml.erb > .circleci/config.yml version: 2 jobs: build_2.3.4_rails_3: docker: - image: deliveroo/multiruby - image: redis:3-alpine steps: - checkout - run: name: Select build variant (Ruby 2.3.4, rails_3) command: | rbenv local 2.3.4 ; gem install bundler -v '~> 1.17' ; bundle config --local gemfile $PWD/gemfiles/rails_3.gemfile - restore_cache: keys: - v2-bundle-2.3.4-rails_3-{{ .Branch }} - v2-bundle-2.3.4-rails_3 - v2-bundle-2.3.4 - run: name: Install dependencies command: | bundle install --jobs=3 --retry=3 --path=$PWD/vendor/bundle - run: name: Run test suite command: | unset RACK_ENV && unset RAILS_ENV && bundle exec rspec - save_cache: key: v2-bundle-2.3.4-rails_3-{{ .Branch }} paths: - ~/project/vendor/bundle - save_cache: key: v2-bundle-2.3.4-rails_3 paths: - ~/project/vendor/bundle - save_cache: key: v2-bundle-2.3.4 paths: - ~/project/vendor/bundle build_2.3.4_rails_4: docker: - image: deliveroo/multiruby - image: redis:3-alpine steps: - checkout - run: name: Select build variant (Ruby 2.3.4, rails_4) command: | rbenv local 2.3.4 ; gem install bundler -v '~> 1.17' ; bundle config --local gemfile $PWD/gemfiles/rails_4.gemfile - restore_cache: keys: - v2-bundle-2.3.4-rails_4-{{ .Branch }} - v2-bundle-2.3.4-rails_4 - v2-bundle-2.3.4 - run: name: Install dependencies command: | bundle install --jobs=3 --retry=3 --path=$PWD/vendor/bundle - run: name: Run test suite command: | unset RACK_ENV && unset RAILS_ENV && bundle exec rspec - save_cache: key: v2-bundle-2.3.4-rails_4-{{ .Branch }} paths: - ~/project/vendor/bundle - save_cache: key: v2-bundle-2.3.4-rails_4 paths: - ~/project/vendor/bundle - save_cache: key: v2-bundle-2.3.4 paths: - ~/project/vendor/bundle build_2.4.1_rails_4: docker: - image: deliveroo/multiruby - image: redis:3-alpine steps: - checkout - run: name: Select build variant (Ruby 2.4.1, rails_4) command: | rbenv local 2.4.1 ; gem install bundler -v '~> 1.17' ; bundle config --local gemfile $PWD/gemfiles/rails_4.gemfile - restore_cache: keys: - v2-bundle-2.4.1-rails_4-{{ .Branch }} - v2-bundle-2.4.1-rails_4 - v2-bundle-2.4.1 - run: name: Install dependencies command: | bundle install --jobs=3 --retry=3 --path=$PWD/vendor/bundle - run: name: Run test suite command: | unset RACK_ENV && unset RAILS_ENV && bundle exec rspec - save_cache: key: v2-bundle-2.4.1-rails_4-{{ .Branch }} paths: - ~/project/vendor/bundle - save_cache: key: v2-bundle-2.4.1-rails_4 paths: - ~/project/vendor/bundle - save_cache: key: v2-bundle-2.4.1 paths: - ~/project/vendor/bundle build_2.3.4_rails_5: docker: - image: deliveroo/multiruby - image: redis:3-alpine steps: - checkout - run: name: Select build variant (Ruby 2.3.4, rails_5) command: | rbenv local 2.3.4 ; gem install bundler -v '~> 1.17' ; bundle config --local gemfile $PWD/gemfiles/rails_5.gemfile - restore_cache: keys: - v2-bundle-2.3.4-rails_5-{{ .Branch }} - v2-bundle-2.3.4-rails_5 - v2-bundle-2.3.4 - run: name: Install dependencies command: | bundle install --jobs=3 --retry=3 --path=$PWD/vendor/bundle - run: name: Run test suite command: | unset RACK_ENV && unset RAILS_ENV && bundle exec rspec - save_cache: key: v2-bundle-2.3.4-rails_5-{{ .Branch }} paths: - ~/project/vendor/bundle - save_cache: key: v2-bundle-2.3.4-rails_5 paths: - ~/project/vendor/bundle - save_cache: key: v2-bundle-2.3.4 paths: - ~/project/vendor/bundle build_2.4.1_rails_5: docker: - image: deliveroo/multiruby - image: redis:3-alpine steps: - checkout - run: name: Select build variant (Ruby 2.4.1, rails_5) command: | rbenv local 2.4.1 ; gem install bundler -v '~> 1.17' ; bundle config --local gemfile $PWD/gemfiles/rails_5.gemfile - restore_cache: keys: - v2-bundle-2.4.1-rails_5-{{ .Branch }} - v2-bundle-2.4.1-rails_5 - v2-bundle-2.4.1 - run: name: Install dependencies command: | bundle install --jobs=3 --retry=3 --path=$PWD/vendor/bundle - run: name: Run test suite command: | unset RACK_ENV && unset RAILS_ENV && bundle exec rspec - save_cache: key: v2-bundle-2.4.1-rails_5-{{ .Branch }} paths: - ~/project/vendor/bundle - save_cache: key: v2-bundle-2.4.1-rails_5 paths: - ~/project/vendor/bundle - save_cache: key: v2-bundle-2.4.1 paths: - ~/project/vendor/bundle workflows: version: 2 test: jobs: - build_2.3.4_rails_3 - build_2.3.4_rails_4 - build_2.4.1_rails_4 - build_2.3.4_rails_5 - build_2.4.1_rails_5