version: 2.1 orbs: ship: auth0/ship@dev:d1e3a7f codecov: codecov/codecov@3 matrix_rubyversions: &matrix_rubyversions matrix: parameters: rubyversion: ["3.0", "3.1", "3.2"] # Default version of ruby to use for lint and publishing default_rubyversion: &default_rubyversion "3.2" executors: ruby: parameters: rubyversion: type: string default: *default_rubyversion docker: - image: cimg/ruby:<< parameters.rubyversion >> jobs: run-tests: parameters: rubyversion: type: string default: *default_rubyversion executor: name: ruby rubyversion: "<< parameters.rubyversion >>" steps: - checkout - restore_cache: keys: - gems-v2-{{ checksum "Gemfile" }} - gems-v2- - run: | echo 'export BUNDLER_VERSION=$(cat Gemfile.lock | tail -1 | tr -d " ")' >> $BASH_ENV source $BASH_ENV gem install bundler bundle check || bundle install - save_cache: key: gems-v2--{{ checksum "Gemfile" }} paths: - vendor/bundle - run: bundle exec rake spec - codecov/upload workflows: tests: jobs: - run-tests: <<: *matrix_rubyversions - ship/ruby-publish: context: - publish-rubygems - publish-gh filters: branches: only: - master requires: - run-tests