Skip to content

Commit

Permalink
Run tests with JRuby 9.3 as well as 9.4
Browse files Browse the repository at this point in the history
  • Loading branch information
chadlwilson committed Nov 26, 2024
1 parent 7e15e72 commit b56fb79
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ on:

jobs:
build:
name: Java ${{ matrix.java_version }}
name: JRuby ${{ matrix.jruby_version }} / Java ${{ matrix.java_version }}
runs-on: ubuntu-latest

strategy:
matrix:
java_version: [ '8', '11', '17', '21' ]
jruby_version: [ '9.3.15.0', '9.4.9.0' ]
fail-fast: false

steps:
Expand All @@ -33,9 +34,9 @@ jobs:
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B install --file pom.xml
run: mvn -B install --file pom.xml -Djruby.version=${{ matrix.jruby_version }}

# Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
- name: Update dependency graph
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
if: github.head_ref == 'refs/heads/master' && matrix.java_version == '8'
if: github.head_ref == 'refs/heads/master' && matrix.java_version == '8' && startsWith(matrix.jruby_version, '9.4')
4 changes: 2 additions & 2 deletions src/spec/ruby/rack/application_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -361,10 +361,10 @@ def newRuntime() # use the current runtime instead of creating new
set_config 'jruby.runtime.env', 'false'
set_config 'jruby.runtime.env.rubyopt', 'true'

app_factory = app_factory_with_RUBYOPT '-W:no-deprecated'
app_factory = app_factory_with_RUBYOPT '-U'
@runtime = app_factory.newRuntime
should_eval_as_nil "ENV['HOME']"
should_eval_as_eql_to "ENV['RUBYOPT']", '-W:no-deprecated'
should_eval_as_eql_to "ENV['RUBYOPT']", '-U'
end

it "keeps RUBYOPT by default with empty ENV (backwards compat)" do
Expand Down

0 comments on commit b56fb79

Please sign in to comment.