From 0c1aab37c3cae828d175270982d40f003a246ee7 Mon Sep 17 00:00:00 2001 From: Laura Collins Date: Thu, 17 Oct 2024 11:23:46 +0100 Subject: [PATCH] Add ruby version matrix to the CI --- .github/workflows/rspec.yml | 13 ++++++++++--- Dockerfile | 2 +- cache_store_redis.gemspec | 2 ++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rspec.yml b/.github/workflows/rspec.yml index 89ea675..0e72218 100644 --- a/.github/workflows/rspec.yml +++ b/.github/workflows/rspec.yml @@ -6,6 +6,11 @@ jobs: test: runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + ruby-version: ['3.2', '3.1', '3.0'] + services: redis: image: redis:alpine @@ -18,10 +23,12 @@ jobs: - 6379:6379 steps: - - uses: actions/checkout@v3 - - uses: ruby/setup-ruby@v1 + - uses: actions/checkout@v4 + + - name: Set up Ruby ${{ matrix.ruby-version }} + uses: ruby/setup-ruby@v1 with: - ruby-version: 2.7 + ruby-version: ${{ matrix.ruby-version }} bundler-cache: true - name: Run tests diff --git a/Dockerfile b/Dockerfile index 7e48cb5..340d784 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:2.7-buster +FROM ruby:3.2 ARG BUNDLE_SAGEONEGEMS__JFROG__IO diff --git a/cache_store_redis.gemspec b/cache_store_redis.gemspec index 3f1ac0d..eabbe87 100644 --- a/cache_store_redis.gemspec +++ b/cache_store_redis.gemspec @@ -13,6 +13,8 @@ Gem::Specification.new do |spec| spec.homepage = 'https://github.com/sage/cache_store' spec.license = 'MIT' + spec.required_ruby_version = '>= 3.0' + spec.files = Dir.glob("{bin,lib}/**/**/**") spec.bindir = 'exe' spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }