Skip to content

Commit a45ee90

Browse files
committed
👷 add JRuby 9.1, 9.2, 9.3, 9.4 to CI
1 parent 98756a8 commit a45ee90

File tree

3 files changed

+92
-1
lines changed

3 files changed

+92
-1
lines changed

.github/workflows/heads.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ jobs:
5454
bundler: default
5555

5656
# jruby-head
57-
# Error output has a significantly different format in JRuby :(
5857
- ruby: "jruby-head"
5958
appraisal: "jruby-head"
6059
exec_cmd: "rake spec"

.github/workflows/jruby.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: JRuby
2+
3+
env:
4+
K_SOUP_COV_DO: false
5+
6+
on:
7+
push:
8+
branches:
9+
- 'main'
10+
tags:
11+
- '!*' # Do not execute on tags
12+
pull_request:
13+
branches:
14+
- '*'
15+
# Allow manually triggering the workflow.
16+
workflow_dispatch:
17+
18+
permissions:
19+
contents: read
20+
21+
# Cancels all previous workflow runs for the same branch that have not yet completed.
22+
concurrency:
23+
# The concurrency group contains the workflow name and the branch name.
24+
group: "${{ github.workflow }}-${{ github.ref }}"
25+
cancel-in-progress: true
26+
27+
jobs:
28+
test:
29+
name: Specs - Ruby ${{ matrix.ruby }} ${{ matrix.appraisal }}${{ matrix.name_extra || '' }}
30+
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
31+
runs-on: ubuntu-22.04
32+
continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }}
33+
env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps
34+
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile
35+
strategy:
36+
matrix:
37+
include:
38+
# TODO: truffleruby does not support upgrading rubygems; VALIDATE ASSUMPTION that same applies to JRuby
39+
# jruby-9.1 (targets Ruby 2.3 compatibility)
40+
- ruby: "jruby-9.1"
41+
appraisal: "ruby-2-3"
42+
exec_cmd: "rake spec"
43+
gemfile: "Appraisal.root"
44+
rubygems: default
45+
bundler: default
46+
47+
# jruby-9.2 (targets Ruby 2.5 compatibility)
48+
- ruby: "jruby-9.2"
49+
appraisal: "ruby-2-5"
50+
exec_cmd: "rake spec"
51+
gemfile: "Appraisal.root"
52+
rubygems: default
53+
bundler: default
54+
55+
# jruby-9.3 (targets Ruby 2.6 compatibility)
56+
- ruby: "jruby-9.3"
57+
appraisal: "ruby-2-6"
58+
exec_cmd: "rake spec"
59+
gemfile: "Appraisal.root"
60+
rubygems: default
61+
bundler: default
62+
63+
# jruby-9.4 (targets Ruby 3.1 compatibility)
64+
- ruby: "jruby-9.4"
65+
appraisal: "ruby-3-1"
66+
exec_cmd: "rake spec"
67+
gemfile: "Appraisal.root"
68+
rubygems: default
69+
bundler: default
70+
71+
steps:
72+
- name: Checkout
73+
uses: actions/checkout@v4
74+
75+
- name: Setup Ruby & RubyGems
76+
uses: ruby/setup-ruby@v1
77+
with:
78+
ruby-version: ${{ matrix.ruby }}
79+
rubygems: ${{ matrix.rubygems }}
80+
bundler: ${{ matrix.bundler }}
81+
bundler-cache: false
82+
83+
# Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root)
84+
# We need to do this first to get appraisal installed.
85+
# NOTE: This does not use the main Gemfile at all.
86+
- name: Bundle install for Appraisal ${{ matrix.appraisal }}
87+
run: bundle
88+
- name: Install Appraisal ${{ matrix.appraisal }} dependencies
89+
run: bundle exec appraisal ${{ matrix.appraisal }} bundle
90+
- name: Run ${{ matrix.appraisal }} tests via ${{ matrix.exec_cmd }}
91+
run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }}

.github/workflows/truffle.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
strategy:
3636
matrix:
3737
include:
38+
# NOTE: truffleruby does not support upgrading rubygems.
3839
# truffleruby-22.3 (targets Ruby 3.0 compatibility)
3940
- ruby: "truffleruby-22.3"
4041
appraisal: "ruby-3-0"

0 commit comments

Comments
 (0)