|
1 | 1 | name: Ruby
|
2 | 2 |
|
3 | 3 | on:
|
4 |
| - # Trigger the workflow on push or pull request, |
5 |
| - # but only for the master branch |
6 | 4 | push:
|
7 | 5 | branches:
|
8 |
| - - master |
| 6 | + - '**' |
9 | 7 | pull_request:
|
10 | 8 | branches:
|
11 |
| - - master |
| 9 | + - '**' |
12 | 10 |
|
13 | 11 | jobs:
|
14 | 12 | build:
|
15 |
| - env: |
16 |
| - BUNDLE_GEMFILE: ${{ matrix.gemfile }} |
| 13 | + runs-on: ubuntu-latest |
| 14 | + |
17 | 15 | strategy:
|
18 | 16 | fail-fast: false
|
19 | 17 | matrix:
|
20 |
| - ruby_version: [3.1, "3.0", 2.7, 2.6, jruby] |
21 |
| - gemfile: |
22 |
| - [ |
23 |
| - Gemfile, |
24 |
| - gemfiles/rails_5.gemfile, |
25 |
| - gemfiles/rails_6.gemfile, |
26 |
| - gemfiles/rails_7.gemfile, |
27 |
| - ] |
28 |
| - exclude: |
29 |
| - # Ruby 3.1 is not supported by Rails 5.2.x |
30 |
| - - ruby_version: 3.1 |
31 |
| - gemfile: gemfiles/rails_5.gemfile, |
| 18 | + ruby: |
| 19 | + - '3.3' |
| 20 | + - '3.2' |
| 21 | + - '3.1' |
| 22 | + - '3.0' |
| 23 | + - '2.7' |
| 24 | + - jruby |
| 25 | + rails: |
| 26 | + - rails_7.2 |
| 27 | + - rails_7.1 |
| 28 | + - rails_7.0 |
| 29 | + - rails_6.1 |
| 30 | + - rails_6.0 |
| 31 | + - rails_5.2 |
| 32 | + - rails_5.1 |
| 33 | + - rails_5.0 |
32 | 34 |
|
33 |
| - # Ruby 3.x is not supported by Rails 5.2.x |
34 |
| - - ruby_version: 3.0 |
35 |
| - gemfile: gemfiles/rails_5.gemfile, |
| 35 | + exclude: |
| 36 | + - ruby: '2.7' |
| 37 | + rails: 'rails_7.2' |
36 | 38 |
|
37 |
| - # Ruby 2.6.x is not supported by Rails 7.0.x |
38 |
| - - ruby_version: 2.6 |
39 |
| - gemfile: gemfiles/rails_7.gemfile |
| 39 | + - ruby: '3.0' |
| 40 | + rails: 'rails_5.0' |
| 41 | + - ruby: '3.0' |
| 42 | + rails: 'rails_5.1' |
| 43 | + - ruby: '3.0' |
| 44 | + rails: 'rails_5.2' |
| 45 | + - ruby: '3.0' |
| 46 | + rails: 'rails_7.2' |
40 | 47 |
|
41 |
| - # Ruby 2.6.x is not supported by this Gemfile |
42 |
| - - ruby_version: 2.6 |
43 |
| - gemfile: Gemfile |
| 48 | + - ruby: '3.1' |
| 49 | + rails: 'rails_5.0' |
| 50 | + - ruby: '3.1' |
| 51 | + rails: 'rails_5.1' |
| 52 | + - ruby: '3.1' |
| 53 | + rails: 'rails_5.2' |
44 | 54 |
|
45 |
| - # JRuby is not supported by Rails 7.0.x |
46 |
| - - ruby_version: jruby |
47 |
| - gemfile: gemfiles/rails_7.gemfile |
| 55 | + - ruby: '3.2' |
| 56 | + rails: 'rails_5.0' |
| 57 | + - ruby: '3.2' |
| 58 | + rails: 'rails_5.1' |
| 59 | + - ruby: '3.2' |
| 60 | + rails: 'rails_5.2' |
48 | 61 |
|
49 |
| - # JRuby is not supported by this Gemfile |
50 |
| - - ruby_version: jruby |
51 |
| - gemfile: Gemfile |
| 62 | + - ruby: '3.3' |
| 63 | + rails: 'rails_5.0' |
| 64 | + - ruby: '3.3' |
| 65 | + rails: 'rails_5.1' |
| 66 | + - ruby: '3.3' |
| 67 | + rails: 'rails_5.2' |
52 | 68 |
|
53 |
| - runs-on: ubuntu-latest |
| 69 | + env: |
| 70 | + BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.rails }}.gemfile |
54 | 71 |
|
55 | 72 | steps:
|
56 |
| - - uses: actions/checkout@v2 |
| 73 | + - uses: actions/checkout@v4 |
| 74 | + |
57 | 75 | - name: Set up Ruby
|
58 | 76 | uses: ruby/setup-ruby@v1
|
59 | 77 | with:
|
60 |
| - ruby-version: ${{ matrix.ruby_version }} |
61 |
| - bundler-cache: true # 'bundle install' and cache |
| 78 | + ruby-version: ${{ matrix.ruby }} |
| 79 | + bundler-cache: true |
| 80 | + |
62 | 81 | - name: Build and test with Rake
|
63 | 82 | run: bundle exec rake
|
0 commit comments