Skip to content

Commit 5394146

Browse files
yahondaclaude
andcommitted
Upgrade JDBC driver to ojdbc17.jar and add test_11g_ojdbc11 workflow
- Update all workflows to download ojdbc17.jar 23.26.1 (was ojdbc11.jar 23.3) - Add test_11g_ojdbc11 workflow for JRuby with ojdbc11.jar against Oracle 11g - Use job.services.oracle.id instead of docker ps for container ID - Skip draft pull requests in test_11g_ojdbc11 workflow Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 39cf870 commit 5394146

5 files changed

Lines changed: 101 additions & 10 deletions

File tree

.github/workflows/jruby_head.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
echo "/opt/oracle/instantclient_23_26" >> $GITHUB_PATH
5858
- name: Install JDBC Driver
5959
run: |
60-
wget -q https://download.oracle.com/otn-pub/otn_software/jdbc/233/ojdbc11.jar -O ./lib/ojdbc11.jar
60+
wget -q https://download.oracle.com/otn-pub/otn_software/jdbc/23261/ojdbc17.jar -O ./lib/ojdbc17.jar
6161
- name: Create database user
6262
run: |
6363
./ci/setup_accounts.sh

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
echo "/opt/oracle/instantclient_23_26" >> $GITHUB_PATH
6363
- name: Install JDBC Driver
6464
run: |
65-
wget -q https://download.oracle.com/otn-pub/otn_software/jdbc/233/ojdbc11.jar -O ./lib/ojdbc11.jar
65+
wget -q https://download.oracle.com/otn-pub/otn_software/jdbc/23261/ojdbc17.jar -O ./lib/ojdbc17.jar
6666
- name: Create database user
6767
run: |
6868
./ci/setup_accounts.sh

.github/workflows/test_11g.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,19 @@ jobs:
6767
echo "/opt/oracle/instantclient_21_15" >> $GITHUB_PATH
6868
- name: Install JDBC Driver
6969
run: |
70-
wget -q https://download.oracle.com/otn-pub/otn_software/jdbc/233/ojdbc11.jar -O ./lib/ojdbc11.jar
70+
wget -q https://download.oracle.com/otn-pub/otn_software/jdbc/23261/ojdbc17.jar -O ./lib/ojdbc17.jar
7171
- name: Configure ORA_TZFILE to match Oracle 11g server
7272
run: |
73-
# Oracle 11g XE uses timezone file v14; Instant Client 21.15 embeds v35.
74-
# This mismatch causes ORA-01805 when ruby-oci8 fetches DATE/TIMESTAMP
73+
# Oracle 11g XE uses timezone file v14; Instant Client 21.15 embeds
74+
# v35. This mismatch causes ORA-01805 when fetching DATE/TIMESTAMP
7575
# values. Copy the v14 files from the 11g container and point the
7676
# Instant Client at them via ORA_TZFILE.
77-
ORACLE_CONTAINER=$(docker ps --filter "ancestor=gvenzl/oracle-xe:11" -q)
78-
sudo mkdir -p /opt/oracle/instantclient_21_15/oracore/zoneinfo
77+
ORACLE_CONTAINER="${{ job.services.oracle.id }}"
78+
sudo mkdir -p "$ORACLE_HOME/oracore/zoneinfo"
7979
docker cp "$ORACLE_CONTAINER":/u01/app/oracle/product/11.2.0/xe/oracore/zoneinfo/timezlrg_14.dat /tmp/timezlrg_14.dat
8080
docker cp "$ORACLE_CONTAINER":/u01/app/oracle/product/11.2.0/xe/oracore/zoneinfo/timezone_14.dat /tmp/timezone_14.dat
81-
sudo mv /tmp/timezlrg_14.dat /opt/oracle/instantclient_21_15/oracore/zoneinfo/
82-
sudo mv /tmp/timezone_14.dat /opt/oracle/instantclient_21_15/oracore/zoneinfo/
81+
sudo mv /tmp/timezlrg_14.dat "$ORACLE_HOME/oracore/zoneinfo/"
82+
sudo mv /tmp/timezone_14.dat "$ORACLE_HOME/oracore/zoneinfo/"
8383
echo "ORA_TZFILE=timezlrg_14.dat" >> $GITHUB_ENV
8484
- name: Create database user
8585
run: |
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: test_11g_ojdbc11
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
types: [opened, synchronize, reopened, ready_for_review]
9+
10+
jobs:
11+
build:
12+
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
13+
14+
runs-on: ubuntu-latest
15+
continue-on-error: true
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
ruby: [
20+
'jruby-10.0.5.0',
21+
'jruby-head',
22+
]
23+
env:
24+
ORACLE_HOME: /opt/oracle/instantclient_21_15
25+
LD_LIBRARY_PATH: /opt/oracle/instantclient_21_15
26+
NLS_LANG: AMERICAN_AMERICA.AL32UTF8
27+
TNS_ADMIN: ./ci/network/admin
28+
DATABASE_NAME: XE
29+
TZ: Europe/Riga
30+
DATABASE_SYS_PASSWORD: Oracle18
31+
32+
services:
33+
oracle:
34+
image: gvenzl/oracle-xe:11
35+
ports:
36+
- 1521:1521
37+
env:
38+
TZ: Europe/Riga
39+
ORACLE_PASSWORD: Oracle18
40+
options: >-
41+
--health-cmd healthcheck.sh
42+
--health-interval 10s
43+
--health-timeout 5s
44+
--health-retries 10
45+
46+
steps:
47+
- uses: actions/checkout@v6
48+
- name: Set up Ruby
49+
uses: ruby/setup-ruby@v1
50+
with:
51+
ruby-version: ${{ matrix.ruby }}
52+
- name: Create symbolic link for libaio library compatibility
53+
run: |
54+
sudo ln -s /usr/lib/x86_64-linux-gnu/libaio.so.1t64 /usr/lib/x86_64-linux-gnu/libaio.so.1
55+
- name: Download Oracle instant client
56+
run: |
57+
wget -q https://download.oracle.com/otn_software/linux/instantclient/2115000/instantclient-basic-linux.x64-21.15.0.0.0dbru.zip
58+
wget -q https://download.oracle.com/otn_software/linux/instantclient/2115000/instantclient-sqlplus-linux.x64-21.15.0.0.0dbru.zip
59+
wget -q https://download.oracle.com/otn_software/linux/instantclient/2115000/instantclient-sdk-linux.x64-21.15.0.0.0dbru.zip
60+
- name: Install Oracle instant client
61+
run: |
62+
sudo mkdir -p /opt/oracle/
63+
sudo unzip -q instantclient-basic-linux.x64-21.15.0.0.0dbru.zip -d /opt/oracle
64+
sudo unzip -qo instantclient-sqlplus-linux.x64-21.15.0.0.0dbru.zip -d /opt/oracle
65+
sudo unzip -qo instantclient-sdk-linux.x64-21.15.0.0.0dbru.zip -d /opt/oracle
66+
echo "/opt/oracle/instantclient_21_15" >> $GITHUB_PATH
67+
- name: Install JDBC Driver
68+
run: |
69+
wget -q https://download.oracle.com/otn-pub/otn_software/jdbc/23261/ojdbc11.jar -O ./lib/ojdbc11.jar
70+
- name: Configure ORA_TZFILE to match Oracle 11g server
71+
run: |
72+
# Oracle 11g XE uses timezone file v14; Instant Client 21.15 embeds
73+
# v35. This mismatch causes ORA-01805 when fetching DATE/TIMESTAMP
74+
# values. Copy the v14 files from the 11g container and point the
75+
# Instant Client at them via ORA_TZFILE.
76+
ORACLE_CONTAINER="${{ job.services.oracle.id }}"
77+
sudo mkdir -p "$ORACLE_HOME/oracore/zoneinfo"
78+
docker cp "$ORACLE_CONTAINER":/u01/app/oracle/product/11.2.0/xe/oracore/zoneinfo/timezlrg_14.dat /tmp/timezlrg_14.dat
79+
docker cp "$ORACLE_CONTAINER":/u01/app/oracle/product/11.2.0/xe/oracore/zoneinfo/timezone_14.dat /tmp/timezone_14.dat
80+
sudo mv /tmp/timezlrg_14.dat "$ORACLE_HOME/oracore/zoneinfo/"
81+
sudo mv /tmp/timezone_14.dat "$ORACLE_HOME/oracore/zoneinfo/"
82+
echo "ORA_TZFILE=timezlrg_14.dat" >> $GITHUB_ENV
83+
- name: Create database user
84+
run: |
85+
./ci/setup_accounts.sh
86+
- name: Bundle install
87+
run: |
88+
bundle install --jobs 4 --retry 3
89+
- name: Run RSpec
90+
run: |
91+
RUBYOPT=-w bundle exec rspec

.github/workflows/test_gemfiles.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
echo "/opt/oracle/instantclient_23_26" >> $GITHUB_PATH
8585
- name: Install JDBC Driver
8686
run: |
87-
wget -q https://download.oracle.com/otn-pub/otn_software/jdbc/233/ojdbc11.jar -O ./lib/ojdbc11.jar
87+
wget -q https://download.oracle.com/otn-pub/otn_software/jdbc/23261/ojdbc17.jar -O ./lib/ojdbc17.jar
8888
- name: Create database user
8989
run: |
9090
./ci/setup_accounts.sh

0 commit comments

Comments
 (0)