Skip to content

Commit 5e6acb7

Browse files
authored
Merge pull request #271 from chadlwilson/appraisals-tests
Fix compatibility with Rack 2.x on Rails 7.0+, reinstating Rails appraisal tests
2 parents b813106 + cb9e384 commit 5e6acb7

File tree

73 files changed

+1748
-5531
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+1748
-5531
lines changed

Diff for: .github/workflows/maven.yml

+76-11
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
1-
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2-
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
3-
4-
# This workflow uses actions that are not certified by GitHub.
5-
# They are provided by a third-party and are governed by
6-
# separate terms of service, privacy policy, and support
7-
# documentation.
8-
9-
name: Java CI with Maven
1+
name: Java CI
102

113
on:
124
push:
@@ -21,22 +13,95 @@ jobs:
2113

2214
strategy:
2315
matrix:
16+
jruby_version: [ '9.3.15.0', '9.4.12.0' ]
2417
java_version: [ '8', '11', '17', '21' ]
25-
jruby_version: [ '9.3.15.0', '9.4.9.0' ]
2618
fail-fast: false
2719

2820
steps:
2921
- uses: actions/checkout@v4
22+
3023
- name: Set up JDK
3124
uses: actions/setup-java@v4
3225
with:
3326
java-version: ${{ matrix.java_version }}
3427
distribution: 'temurin'
3528
cache: maven
29+
3630
- name: Build with Maven
37-
run: mvn -B install --file pom.xml -Djruby.version=${{ matrix.jruby_version }}
31+
run: mvn -B install -Djruby.version=${{ matrix.jruby_version }}
3832

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

0 commit comments

Comments
 (0)