From ac2c8e018984bd52301adc44bca0eb063512e664 Mon Sep 17 00:00:00 2001 From: Adam Stegman Date: Thu, 4 Jan 2024 10:19:19 -0600 Subject: [PATCH] Add Ruby head --- .circleci/config.yml | 45 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6167956..9fa90d3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -26,6 +26,44 @@ jobs: # Always install the latest versions available with-cache: false - ruby/rspec-test + test-ruby-head: + parameters: + rails-version: + type: string + docker: + - image: cimg/base:stable + environment: + RAILS_VERSION: <> + steps: + - checkout + - ruby/install: + # RVM wants Ruby 2 for some reason to install Ruby head. + # But then it will use 2.7.8 by default in the future; + # we must use `rvm use ruby-head` before every command that matters + version: "2.7.8" + - ruby/install: + version: ruby-head + - restore_cache: + keys: + - v1-{{ arch }}-ruby-head-bundler + - run: + name: Install Ruby dependencies + command: | + rvm use ruby-head + ruby --version + gem install bundler:\>2 + bundle config set path bundle + bundle update + - save_cache: + key: v1-{{ arch }}-ruby-head-bundler + paths: + - ./bundle + - run: + name: RSpec tests + command: | + rvm use ruby-head + ruby --version + bundle exec rspec workflows: test: @@ -42,3 +80,10 @@ workflows: - "~> 7.1.0" - "~> 7.0.0" - "~> 6.1.0" + - test-ruby-head: + matrix: + parameters: + rails-version: + - "~> 7.1.0" + - "~> 7.0.0" + - "~> 6.1.0"