Verified Commit 6a628d50 authored by Stan Hu's avatar Stan Hu
Browse files

Add Ruby 3.1 and 3.2 to CI builds

Refactor .gitlab-ci.yml for parallel matrix builds and add
caching for vendored gems.
parent c980cfbd
Loading
Loading
Loading
Loading
+12 −9
Original line number Diff line number Diff line
default:
  image: ruby:2.7
  image: ruby:3.1

workflow:
  rules:
@@ -11,19 +11,22 @@ workflow:
    - if: '$CI_COMMIT_TAG'

.test_template: &test_definition
  image: ruby:${RUBY_VERSION}
  stage: test
  script:
    - gem install bundler
    - gem install bundler --no-document
    - bundle config --local path vendor
    - bundle install
    - bundle exec rake verify build install

test:3.0:
  image: ruby:3.0
  <<: *test_definition

test:2.7:
  image: ruby:2.7
  cache:
    key: ${CI_JOB_IMAGE}
    paths:
      - vendor/ruby
ruby:
  <<: *test_definition
  parallel:
    matrix:
      - RUBY_VERSION: ["2.7", "3.0", "3.1", "3.2"]

static-analysis:
  before_script: