Skip to content

Commit

Permalink
First draft of test action
Browse files Browse the repository at this point in the history
  • Loading branch information
jmarchello committed Jul 27, 2023
1 parent 53ae042 commit 6e74c19
Showing 1 changed file with 124 additions and 0 deletions.
124 changes: 124 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
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

0 comments on commit 6e74c19

Please sign in to comment.