First draft of test action #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: [push, pull_request] | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
gemfile: | |
- test/rails_5.0.gemfile | |
- test/rails_5.1.gemfile | |
- test/rails_5.2.gemfile | |
- test/rails_6.0.gemfile | |
- test/rails_6.1.gemfile | |
- test/rails_6.2.gemfile | |
- test/rails_edge.gemfile | |
ruby: | |
- '3.2' | |
- '3.1' | |
- '3.0' | |
- '2.7' | |
- '2.6' | |
- '2.5' | |
- '2.4' | |
- '2.3' | |
- '2.2' | |
- '2.1' | |
exclude: | |
- gemfile: Gemfile | |
ruby: '2.6' | |
- gemfile: Gemfile | |
ruby: '2.5' | |
- gemfile: Gemfile | |
ruby: '2.4' | |
- gemfile: Gemfile | |
ruby: '2.3' | |
- gemfile: Gemfile | |
ruby: '2.2' | |
- gemfile: Gemfile | |
ruby: '2.1' | |
- gemfile: test/rails_edge.gemfile | |
ruby: '2.6' | |
- gemfile: test/rails_edge.gemfile | |
ruby: '2.5' | |
- gemfile: test/rails_edge.gemfile | |
ruby: '2.4' | |
- gemfile: test/rails_edge.gemfile | |
ruby: '2.3' | |
- gemfile: test/rails_edge.gemfile | |
ruby: '2.2' | |
- gemfile: test/rails_edge.gemfile | |
ruby: '2.1' | |
- gemfile: test/rails_6.1.gemfile | |
ruby: '2.4' | |
- gemfile: test/rails_6.1.gemfile | |
ruby: '2.3' | |
- gemfile: test/rails_6.1.gemfile | |
ruby: '2.2' | |
- gemfile: test/rails_6.1.gemfile | |
ruby: '2.1' | |
- gemfile: test/rails_6.0.gemfile | |
ruby: '3.2' | |
- gemfile: test/rails_6.0.gemfile | |
ruby: '3.1' | |
- gemfile: test/rails_6.0.gemfile | |
ruby: '2.4' | |
- gemfile: test/rails_6.0.gemfile | |
ruby: '2.3' | |
- gemfile: test/rails_6.0.gemfile | |
ruby: '2.2' | |
- gemfile: test/rails_6.0.gemfile | |
ruby: '2.1' | |
- gemfile: test/rails_5.2.gemfile | |
ruby: '3.2' | |
- gemfile: test/rails_5.2.gemfile | |
ruby: '3.1' | |
- gemfile: test/rails_5.2.gemfile | |
ruby: '3.0' | |
- gemfile: test/rails_5.2.gemfile | |
ruby: '2.7' | |
- gemfile: test/rails_5.2.gemfile | |
ruby: '2.2' | |
- gemfile: test/rails_5.2.gemfile | |
ruby: '2.1' | |
- gemfile: test/rails_5.1.gemfile | |
ruby: '3.2' | |
- gemfile: test/rails_5.1.gemfile | |
ruby: '3.1' | |
- gemfile: test/rails_5.1.gemfile | |
ruby: '3.0' | |
- gemfile: test/rails_5.1.gemfile | |
ruby: '2.7' | |
- gemfile: test/rails_5.1.gemfile | |
ruby: '2.1' | |
- gemfile: test/rails_5.0.gemfile | |
ruby: '3.2' | |
- gemfile: test/rails_5.0.gemfile | |
ruby: '3.1' | |
- gemfile: test/rails_5.0.gemfile | |
ruby: '3.0' | |
- gemfile: test/rails_5.0.gemfile | |
ruby: '2.7' | |
- gemfile: test/rails_5.0.gemfile | |
ruby: '2.1' | |
runs-on: ubuntu-latest | |
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps | |
BUNDLE_GEMFILE: ${{ matrix.gemfile }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Bundler 1.x for Rails 4.x | |
if: ${{ matrix.gemfile == 'gemfiles/Gemfile-rails-4-1' || matrix.gemfile == 'gemfiles/Gemfile-rails-4-2' }} | |
run: echo "BUNDLER_VERSION=1.17.3" >> $GITHUB_ENV | |
- name: Setup Rubygems version as default for Ruby < 2.5 | |
if: ${{ matrix.ruby < '2.5' }} | |
run: echo "RUBYGEMS_VERSION=default" >> $GITHUB_ENV | |
- name: Setup Rubygems version as 3.2.3 for Ruby 2.5 | |
if: ${{ matrix.ruby == '2.5' }} | |
run: echo "RUBYGEMS_VERSION=3.2.3" >> $GITHUB_ENV | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true # runs bundle install and caches installed gems automatically | |
bundler: ${{ env.BUNDLER_VERSION || 'default' }} | |
rubygems: ${{ env.RUBYGEMS_VERSION || 'latest' }} | |
- run: ./test/test_with_railsapp |