Skip to content

Commit 7c7a109

Browse files
committed
Re-enable Rails appraisals to run on modern Rails versions
1 parent e34b0f6 commit 7c7a109

37 files changed

+1464
-1204
lines changed

.github/workflows/maven.yml

Lines changed: 75 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# separate terms of service, privacy policy, and support
77
# documentation.
88

9-
name: Java CI with Maven
9+
name: Java CI
1010

1111
on:
1212
push:
@@ -21,22 +21,94 @@ jobs:
2121

2222
strategy:
2323
matrix:
24-
java_version: [ '8', '11', '17', '21' ]
2524
jruby_version: [ '9.3.15.0', '9.4.9.0' ]
25+
java_version: [ '8', '11', '17', '21' ]
2626
fail-fast: false
2727

2828
steps:
2929
- uses: actions/checkout@v4
30+
3031
- name: Set up JDK
3132
uses: actions/setup-java@v4
3233
with:
3334
java-version: ${{ matrix.java_version }}
3435
distribution: 'temurin'
3536
cache: maven
37+
3638
- name: Build with Maven
37-
run: mvn -B install --file pom.xml -Djruby.version=${{ matrix.jruby_version }}
39+
run: mvn -B install -Djruby.version=${{ matrix.jruby_version }}
3840

3941
# Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
4042
- name: Update dependency graph
4143
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
4244
if: github.head_ref == 'refs/heads/master' && matrix.java_version == '8' && startsWith(matrix.jruby_version, '9.4')
45+
46+
appraisals:
47+
needs: build
48+
name: ${{ matrix.appraisal }} appraisal on ${{ matrix.jruby_version }} / Java ${{ matrix.java_version }}
49+
runs-on: ubuntu-latest
50+
51+
strategy:
52+
matrix:
53+
jruby_version: [ '9.3.15.0', '9.4.9.0' ]
54+
java_version: [ '8', '11', '17', '21' ]
55+
appraisal: [ 'rails50', 'rails52', 'rails60', 'rails61', 'rails70', 'rails71', 'rails72' ]
56+
exclude:
57+
- jruby_version: '9.3.15.0'
58+
java_version: '8'
59+
appraisal: 'rails70' # Requires Ruby 2.7 compatibility, which JRuby 9.3 does not support
60+
- jruby_version: '9.3.15.0'
61+
java_version: '8'
62+
appraisal: 'rails71' # Requires Ruby 2.7 compatibility, which JRuby 9.3 does not support
63+
- jruby_version: '9.3.15.0'
64+
java_version: '8'
65+
appraisal: 'rails72' # Requires Ruby 3.1 compatibility, which JRuby 9.3 does not support
66+
- jruby_version: '9.3.15.0'
67+
java_version: '11'
68+
appraisal: 'rails70' # Requires Ruby 2.7 compatibility, which JRuby 9.3 does not support
69+
- jruby_version: '9.3.15.0'
70+
java_version: '11'
71+
appraisal: 'rails71' # Requires Ruby 2.7 compatibility, which JRuby 9.3 does not support
72+
- jruby_version: '9.3.15.0'
73+
java_version: '11'
74+
appraisal: 'rails72' # Requires Ruby 3.1 compatibility, which JRuby 9.3 does not support
75+
- jruby_version: '9.3.15.0'
76+
java_version: '17'
77+
appraisal: 'rails70' # Requires Ruby 2.7 compatibility, which JRuby 9.3 does not support
78+
- jruby_version: '9.3.15.0'
79+
java_version: '17'
80+
appraisal: 'rails71' # Requires Ruby 2.7 compatibility, which JRuby 9.3 does not support
81+
- jruby_version: '9.3.15.0'
82+
java_version: '17'
83+
appraisal: 'rails72' # Requires Ruby 3.1 compatibility, which JRuby 9.3 does not support
84+
- jruby_version: '9.3.15.0'
85+
java_version: '21'
86+
appraisal: 'rails70' # Requires Ruby 2.7 compatibility, which JRuby 9.3 does not support
87+
- jruby_version: '9.3.15.0'
88+
java_version: '21'
89+
appraisal: 'rails71' # Requires Ruby 2.7 compatibility, which JRuby 9.3 does not support
90+
- jruby_version: '9.3.15.0'
91+
java_version: '21'
92+
appraisal: 'rails72' # Requires Ruby 3.1 compatibility, which JRuby 9.3 does not support
93+
fail-fast: false
94+
95+
steps:
96+
- uses: actions/checkout@v4
97+
98+
- name: Set up JDK
99+
uses: actions/setup-java@v4
100+
with:
101+
java-version: ${{ matrix.java_version }}
102+
distribution: 'temurin'
103+
cache: maven
104+
105+
- name: Setup JRuby
106+
uses: ruby/setup-ruby@v1
107+
with:
108+
ruby-version: jruby-${{ matrix.jruby_version }}
109+
110+
- name: Run appraisal for ${{ matrix.appraisal }}
111+
env:
112+
BUNDLE_GEMFILE: gemfiles/${{ matrix.appraisal }}.gemfile
113+
run: bundle install && bundle exec rake spec
114+

0 commit comments

Comments
 (0)