Skip to content

Add Ruby matrix

Add Ruby matrix #21

Workflow file for this run

name: Main
on: [push]
jobs:
vm-job:
runs-on: ubuntu-latest
# https://help.github.com/en/articles/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix
strategy:
fail-fast: false
matrix:
ruby-version:
- '3.0'
- '3.2'
- '3.3'
- head
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
- uses: actions/cache@v3
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Bundle Install
run: |
gem install bundler
bundle install --jobs 4 --retry 3
- name: Run tests
run: |
COVERAGE=true bundle exec rspec
- name: Upload coverage results
uses: actions/upload-artifact@v4
if: always()
with:
name: coverage-report-ruby-${{ matrix.ruby-version }}
path: coverage