|
| 1 | +# This workflow uses actions that are not certified by GitHub. |
| 2 | +# They are provided by a third-party and are governed by |
| 3 | +# separate terms of service, privacy policy, and support |
| 4 | +# documentation. |
| 5 | +# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake |
| 6 | +# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby |
| 7 | + |
| 8 | +name: Ruby |
| 9 | + |
| 10 | +on: |
| 11 | + push: |
| 12 | + branches: [ master ] |
| 13 | + pull_request: |
| 14 | + branches: [ master ] |
| 15 | + |
| 16 | +jobs: |
| 17 | + test: |
| 18 | + runs-on: ubuntu-20.04 |
| 19 | + strategy: |
| 20 | + matrix: |
| 21 | + gemfile: |
| 22 | + - rails_5_0_pundit_1 |
| 23 | + - rails_5_0_pundit_2 |
| 24 | + - rails_5_1_pundit_1 |
| 25 | + - rails_5_1_pundit_2 |
| 26 | + - rails_5_2_pundit_1 |
| 27 | + - rails_5_2_pundit_2 |
| 28 | + - rails_6_0_pundit_1 |
| 29 | + - rails_6_0_pundit_2 |
| 30 | + ruby-version: [ '2.5', '2.7' ] |
| 31 | + bundler-version: [ '1.11' ] |
| 32 | + include: |
| 33 | + # Include Rails 4.2 / Ruby 2.3 combo |
| 34 | + - gemfile: rails_4_2_pundit_1 |
| 35 | + ruby-version: '2.3' |
| 36 | + bundler-version: '1.11' |
| 37 | + - gemfile: rails_4_2_pundit_2 |
| 38 | + ruby-version: '2.3' |
| 39 | + bundler-version: '1.11' |
| 40 | + # Include Rails 6.0 / Ruby 3.0 combo |
| 41 | + - gemfile: rails_6_0_pundit_1 |
| 42 | + ruby-version: '3.0' |
| 43 | + bundler-version: '2.1.4' |
| 44 | + - gemfile: rails_6_0_pundit_2 |
| 45 | + ruby-version: '3.0' |
| 46 | + bundler-version: '2.1.4' |
| 47 | + continue-on-error: true |
| 48 | + env: |
| 49 | + BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile |
| 50 | + steps: |
| 51 | + - uses: actions/checkout@v2 |
| 52 | + - name: Set up Ruby |
| 53 | + # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, |
| 54 | + # change this to (see https://github.com/ruby/setup-ruby#versioning): |
| 55 | + uses: ruby/setup-ruby@v1 |
| 56 | + with: |
| 57 | + bundler: ${{ matrix.bundler-version }} |
| 58 | + ruby-version: ${{ matrix.ruby-version }} |
| 59 | + bundler-cache: true # runs 'bundle install' and caches installed gems automatically |
| 60 | + - name: Run tests |
| 61 | + run: bundle exec rake |
0 commit comments