name: Test supported versions on: push: branches: - 'master' pull_request: {} jobs: spec: runs-on: ubuntu-latest strategy: fail-fast: false matrix: ruby: ['3.2', '3.3', '3.4', '4.0'] gemfile: [rails_7_1, rails_7_2, rails_8_0, rails_8_1] env: BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile steps: - name: Checkout code uses: actions/checkout@v7 - name: Setup Chromedriver uses: nanasess/setup-chromedriver@v3 - name: Setup Ruby and install gems uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b with: bundler-cache: true ruby-version: ${{ matrix.ruby }} # Matched pair: RubyGems ships Bundler at the same version, and `BUNDLED WITH` in # Gemfile.lock is 4.0.17. Leaving this at 3.7.2 would ask a RubyGems that ships Bundler 2.x # to run a lock pinned to Bundler 4. Needs Ruby >= 3.2, which is this matrix's floor. rubygems: 4.0.17 - name: Migrate DB run: bin/rake app:db:migrate - name: Prepare DB run: bin/rake app:db:test:prepare - name: Install ImageMagick run: sudo apt-get update && sudo apt-get install -y imagemagick - name: Run spec run: bin/rspec