From 9bcd8cfdd04f6c648a72dc668725de816d67525a Mon Sep 17 00:00:00 2001 From: Paul Padier Date: Wed, 6 Jul 2022 09:05:00 +0900 Subject: [PATCH] RF-19513 Update CI config to test against modern Ruby versions --- .circleci/config.yml | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index cd2cd8c..fee9faf 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,8 +2,11 @@ version: 2.1 jobs: test: + parameters: + ruby: + type: string docker: - - image: circleci/ruby:2.5.3 + - image: cimg/ruby:<< parameters.ruby >> auth: username: $DOCKERHUB_USERNAME password: $DOCKERHUB_TOKEN @@ -11,7 +14,9 @@ jobs: - checkout - run: name: Install Ruby gems - command: bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3 + command: | + bundle config set --local path 'vendor/bundle' + bundle check || bundle install --jobs=4 --retry=3 - run: name: Set up test output directory command: sudo install -o circleci -d ~/rspec @@ -26,7 +31,7 @@ jobs: --out ~/rspec/rspec.xml push_to_rubygems: docker: - - image: circleci/ruby:2.5.3 + - image: cimg/ruby:3.1.2 auth: username: $DOCKERHUB_USERNAME password: $DOCKERHUB_TOKEN @@ -47,10 +52,21 @@ jobs: gem push get_env-*.gem workflows: - version: 2 test_and_deploy: jobs: - test: + matrix: + alias: old-ruby + parameters: + ruby: ["2.7.6", "3.0.4"] + filters: + tags: + only: + - /^v.*/ + context: + - DockerHub + - test: + ruby: "3.1.2" filters: tags: only: