Skip to content

Simplify the GitHub actions config using matrix #587

Simplify the GitHub actions config using matrix

Simplify the GitHub actions config using matrix #587

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
tests:
strategy:
fail-fast: false
matrix:
ruby-version:
- "3.1"
- "3.2"
- "3.3"
- "3.4"
rails-version:
- "6.1"
- "7.0"
- "7.1"
- "7.2"
- "8.0"
- "main"
assets-pipeline:
- sprockets
- propshaft
exclude:
- rails-version: "6.1"
assets-pipeline: "propshaft"
- ruby-version: "3.1"
rails-version: "8.0"
- ruby-version: "3.1"
rails-version: "main"
name: ${{ format('Tests (Ruby {0}, Rails {1}, {2})', matrix.ruby-version, matrix.rails-version, matrix.assets-pipeline) }}
runs-on: ubuntu-latest
env:
BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.rails-version }}_${{ matrix.assets-pipeline }}.gemfile
steps:
- uses: actions/checkout@v4
- name: Remove Gemfile lock
run: |
rm -f $BUNDLE_GEMFILE.lock
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Run tests
run: |
bundle exec rake