Skip to content

Commit 80ac37e

Browse files
committed
👷 Add JRuby back to CI
1 parent e8e5d04 commit 80ac37e

16 files changed

+203
-126
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"name": "apt-install-feature",
3+
"description": "More packages are needed",
4+
"install": {
5+
"script": "install.sh"
6+
}
7+
}

.devcontainer/devcontainer.json

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,22 @@
66
"image": "mcr.microsoft.com/devcontainers/ruby:1-3-bookworm",
77

88
// Features to add to the dev container. More info: https://containers.dev/features.
9-
// "features": {},
9+
"features": {
10+
"apt-install-feature": {}
11+
},
1012

1113
// Use 'forwardPorts' to make a list of ports inside the container available locally.
1214
// "forwardPorts": [],
1315

1416
// Use 'postCreateCommand' to run commands after the container is created.
15-
"postCreateCommand": "bundle install",
17+
"postCreateCommand": "bundle update --bundler",
1618

1719
// Configure tool-specific properties.
18-
"customizations" : {
19-
"jetbrains" : {
20-
"backend" : "RubyMine"
21-
}
22-
},
20+
"customizations" : {
21+
"jetbrains" : {
22+
"backend" : "RubyMine"
23+
}
24+
},
2325

2426
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
2527
// "remoteUser": "root"

.devcontainer/install.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
apt-get update -y
3+
apt-get install -y java postgresql libpq-dev git zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev

.github/disabled/jruby.yml

Lines changed: 0 additions & 96 deletions
This file was deleted.

.github/workflows/current.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,14 @@ jobs:
8181
# gemfile: "Appraisal.root"
8282
# rubygems: default
8383
# bundler: default
84-
#
85-
# # jruby-9.4 (targets Ruby 3.1 compatibility)
86-
# - ruby: "jruby"
87-
# appraisal: "ar-8-0"
88-
# exec_cmd: "rake spec:orm:active_record"
89-
# gemfile: "Appraisal.root"
90-
# rubygems: default
91-
# bundler: default
84+
85+
# jruby-10.0 (targets Ruby 3.4 compatibility)
86+
- ruby: "jruby"
87+
appraisal: "ar-8-0"
88+
exec_cmd: "rake spec:orm:active_record"
89+
gemfile: "Appraisal.root"
90+
rubygems: default
91+
bundler: default
9292

9393
steps:
9494
### COUCHDB

.github/workflows/heads.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ jobs:
5252
# gemfile: "Appraisal.root"
5353
# rubygems: default
5454
# bundler: default
55-
#
56-
# # jruby-head
57-
# - ruby: "jruby-head"
58-
# appraisal: "couch-1.17"
59-
# exec_cmd: "rake spec:orm:couch_potato"
60-
# gemfile: "Appraisal.root"
61-
# rubygems: default
62-
# bundler: default
55+
56+
# jruby-head
57+
- ruby: "jruby-head"
58+
appraisal: "ar-8-0"
59+
exec_cmd: "rake spec:orm:active_record"
60+
gemfile: "Appraisal.root"
61+
rubygems: default
62+
bundler: default
6363

6464
steps:
6565
### COUCHDB

.github/workflows/jruby.yml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
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 ${{ 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+
# jruby-9.2 (targets Ruby 2.5 compatibility)
39+
- ruby: "jruby-9.2"
40+
appraisal: "ar-6-1"
41+
exec_cmd: "rake spec:orm:active_record"
42+
gemfile: "Appraisal.root"
43+
rubygems: default
44+
bundler: default
45+
46+
# jruby-9.3 (targets Ruby 2.6 compatibility)
47+
- ruby: "jruby-9.3"
48+
appraisal: "ar-6-1"
49+
exec_cmd: "rake spec:orm:active_record"
50+
gemfile: "Appraisal.root"
51+
rubygems: default
52+
bundler: default
53+
54+
# jruby-9.4 (targets Ruby 3.1 compatibility)
55+
- ruby: "jruby-9.4"
56+
appraisal: "ar-7-2"
57+
exec_cmd: "rake spec:orm:active_record"
58+
gemfile: "Appraisal.root"
59+
rubygems: default
60+
bundler: default
61+
62+
steps:
63+
### COUCHDB
64+
- name: Start CouchDB
65+
uses: iamssen/couchdb-github-action@master
66+
if: "endsWith(matrix.exec_cmd, 'couch_potato')"
67+
with:
68+
couchdb-version: "3.4.1"
69+
70+
### SMOKE-TEST
71+
- name: Smoke CouchDB
72+
if: "endsWith(matrix.exec_cmd, 'couch_potato')"
73+
run: |
74+
curl -f http://127.0.0.1:5984/
75+
curl -X POST -H "Content-Type: application/json; charset=utf-8" -d '{"name": "admin", "password": "password"}' http://127.0.0.1:5984/_session
76+
77+
- name: Checkout
78+
uses: actions/checkout@v4
79+
80+
- name: Setup Ruby & RubyGems
81+
uses: ruby/setup-ruby@v1
82+
with:
83+
ruby-version: ${{ matrix.ruby }}
84+
rubygems: ${{ matrix.rubygems }}
85+
bundler: ${{ matrix.bundler }}
86+
bundler-cache: false
87+
88+
# Raw `bundle` will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root)
89+
# We need to do this first to get appraisal installed.
90+
# NOTE: This does not use the main Gemfile at all.
91+
- name: Install Root Appraisal
92+
run: bundle
93+
- name: Appraisal for ${{ matrix.appraisal }}
94+
run: bundle exec appraisal ${{ matrix.appraisal }} bundle
95+
- name: Tests for ${{ matrix.ruby }} via ${{ matrix.exec_cmd }}
96+
run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }}

.rubocop_gradual.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
[13, 7, 113, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 353293128],
4242
[23, 9, 23, "ThreadSafety/ClassAndModuleAttributes: Avoid mutating class and module attributes.", 1578198260]
4343
],
44-
"omniauth-identity.gemspec:2356021538": [
44+
"omniauth-identity.gemspec:3278659492": [
4545
[4, 6, 12, "Gemspec/RubyVersionGlobalsUsage: Do not use `RUBY_VERSION` in gemspec file.", 31296028]
4646
],
4747
"spec/omniauth/identity/model_spec.rb:3920022856": [

Appraisals

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ end
2727

2828
# Compat: Ruby >= 2.5
2929
# Test Matrix:
30+
# - JRuby 9.2
31+
# - JRuby 9.3
3032
# - Ruby 2.5
3133
# - Ruby 2.6
3234
# - Ruby 2.7
@@ -36,6 +38,15 @@ appraise "ar-6-1" do
3638
gem "mutex_m", "~> 0.1"
3739
gem "stringio", "~> 3.0"
3840
gem "sqlite3", "~> 1.4"
41+
platforms :jruby do
42+
# gem 'jdbc-sqlite3', # github: "jruby/activerecord-jdbc-adapter", branch: '61-stable'
43+
# gem 'jdbc-mysql', # github: "jruby/activerecord-jdbc-adapter", branch: '61-stable'
44+
# gem 'jdbc-postgres', # github: "jruby/activerecord-jdbc-adapter", branch: '61-stable'
45+
gem "activerecord-jdbc-adapter", "~> 61.0" # github: "jruby/activerecord-jdbc-adapter", branch: '61-stable'
46+
gem "activerecord-jdbcsqlite3-adapter", "~> 61.0" # github: "jruby/activerecord-jdbc-adapter", branch: '61-stable'
47+
gem "activerecord-jdbcmysql-adapter", "~> 61.0" # github: "jruby/activerecord-jdbc-adapter", branch: '61-stable'
48+
gem "activerecord-jdbcpostgresql-adapter", "~> 61.0" # github: "jruby/activerecord-jdbc-adapter", branch: '61-stable'
49+
end
3950
end
4051

4152
# Compat: Ruby >= 2.7
@@ -65,6 +76,7 @@ end
6576

6677
# Compat: Ruby >= 3.1
6778
# Test Matrix:
79+
# - JRuby 9.4
6880
# - Ruby 3.1
6981
# - Ruby 3.2
7082
# - Ruby 3.3
@@ -73,20 +85,40 @@ appraise "ar-7-2" do
7385
gem "mutex_m", "~> 0.2"
7486
gem "stringio", "~> 3.0"
7587
gem "sqlite3", "~> 1.6"
88+
platforms :jruby do
89+
gem "jdbc-sqlite3", github: "jruby/activerecord-jdbc-adapter", branch: "master"
90+
gem "jdbc-mysql", github: "jruby/activerecord-jdbc-adapter", branch: "master"
91+
gem "jdbc-postgres", github: "jruby/activerecord-jdbc-adapter", branch: "master"
92+
gem "activerecord-jdbc-adapter", github: "jruby/activerecord-jdbc-adapter", branch: "master"
93+
gem "activerecord-jdbcsqlite3-adapter", github: "jruby/activerecord-jdbc-adapter", branch: "master"
94+
gem "activerecord-jdbcmysql-adapter", github: "jruby/activerecord-jdbc-adapter", branch: "master"
95+
gem "activerecord-jdbcpostgresql-adapter", github: "jruby/activerecord-jdbc-adapter", branch: "master"
96+
end
7697
end
7798

7899
# Compat: Ruby >= 3.2
79100
# Test Matrix:
80101
# - Ruby 3.2
81102
# - Ruby 3.3
103+
# - Ruby 3.4
104+
# - JRuby 10.0
82105
# - ruby-head
83106
# - truffleruby-head
84107
# - jruby-head
85108
appraise "ar-8-0" do
86109
gem "activerecord", "~> 8.0.0"
87110
gem "mutex_m", "~> 0.2"
88111
gem "stringio", "~> 3.0"
89-
gem "sqlite3", ">= 1.7"
112+
gem "sqlite3", ">= 1.7", platforms: [:ruby]
113+
platforms :jruby do
114+
gem "jdbc-sqlite3", github: "jruby/activerecord-jdbc-adapter", branch: "master"
115+
gem "jdbc-mysql", github: "jruby/activerecord-jdbc-adapter", branch: "master"
116+
gem "jdbc-postgres", github: "jruby/activerecord-jdbc-adapter", branch: "master"
117+
gem "activerecord-jdbc-adapter", github: "jruby/activerecord-jdbc-adapter", branch: "master"
118+
gem "activerecord-jdbcsqlite3-adapter", github: "jruby/activerecord-jdbc-adapter", branch: "master"
119+
gem "activerecord-jdbcmysql-adapter", github: "jruby/activerecord-jdbc-adapter", branch: "master"
120+
gem "activerecord-jdbcpostgresql-adapter", github: "jruby/activerecord-jdbc-adapter", branch: "master"
121+
end
90122
end
91123

92124
# Compat: Ruby >= 2.2.2 (due to AR >= 5)

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ and this project adheres to [Semantic Versioning v2](https://semver.org/spec/v2.
1111
### Fixed
1212
### Removed
1313

14+
## [3.1.2] - 2024-11-18 ([tag][3.1.1t])
15+
- COVERAGE: 92.00% -- 345/375 lines in 15 files
16+
- BRANCH COVERAGE: 80.26% -- 61/76 branches in 15 files
17+
### Added
18+
- 20-year cert
19+
### Changed
20+
- CoC 2.1
21+
1422
## [3.1.1] - 2024-11-18 ([tag][3.1.1t])
1523
- COVERAGE: 92.00% -- 345/375 lines in 15 files
1624
- BRANCH COVERAGE: 80.26% -- 61/76 branches in 15 files

0 commit comments

Comments
 (0)