Skip to content

Commit 112fbcb

Browse files
committed
Add test_11g_ojdbc11 workflow with Oracle JDK 21
Add a dedicated workflow exercising ruby-plsql against Oracle 11g XE on JRuby 10.0.5.0 with ojdbc11.jar, modeled after the test_11g_ojdbc11 workflow in oracle-enhanced. This keeps ojdbc11 coverage now that the main `test` and `test_11g` workflows have moved to ojdbc17. Pin Oracle JDK 21 via actions/setup-java since ojdbc11.jar is certified with JDK 11 and JDK 21 per Oracle's JDBC downloads page, and JRuby 10 itself requires Java 21.
1 parent 7d282c9 commit 112fbcb

1 file changed

Lines changed: 94 additions & 0 deletions

File tree

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
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+
matrix:
18+
ruby: [
19+
'jruby-10.0.5.0'
20+
]
21+
env:
22+
ORACLE_HOME: /opt/oracle/instantclient_21_15
23+
LD_LIBRARY_PATH: /opt/oracle/instantclient_21_15
24+
NLS_LANG: AMERICAN_AMERICA.AL32UTF8
25+
TNS_ADMIN: ./ci/network/admin
26+
DATABASE_NAME: XE
27+
TZ: Europe/Riga
28+
DATABASE_SYS_PASSWORD: Oracle18
29+
30+
services:
31+
oracle:
32+
image: gvenzl/oracle-xe:11
33+
ports:
34+
- 1521:1521
35+
env:
36+
TZ: Europe/Riga
37+
ORACLE_PASSWORD: Oracle18
38+
options: >-
39+
--health-cmd healthcheck.sh
40+
--health-interval 10s
41+
--health-timeout 5s
42+
--health-retries 10
43+
44+
steps:
45+
- uses: actions/checkout@v6
46+
- name: Set up Java
47+
uses: actions/setup-java@v4
48+
with:
49+
distribution: oracle
50+
java-version: '21'
51+
- name: Set up Ruby
52+
uses: ruby/setup-ruby@v1
53+
with:
54+
ruby-version: ${{ matrix.ruby }}
55+
- name: Create symbolic link for libaio library compatibility
56+
run: |
57+
sudo ln -s /usr/lib/x86_64-linux-gnu/libaio.so.1t64 /usr/lib/x86_64-linux-gnu/libaio.so.1
58+
- name: Download Oracle instant client
59+
run: |
60+
wget -q https://download.oracle.com/otn_software/linux/instantclient/2115000/instantclient-basic-linux.x64-21.15.0.0.0dbru.zip
61+
wget -q https://download.oracle.com/otn_software/linux/instantclient/2115000/instantclient-sqlplus-linux.x64-21.15.0.0.0dbru.zip
62+
wget -q https://download.oracle.com/otn_software/linux/instantclient/2115000/instantclient-sdk-linux.x64-21.15.0.0.0dbru.zip
63+
- name: Install Oracle instant client
64+
run: |
65+
sudo mkdir -p /opt/oracle/
66+
sudo unzip -q instantclient-basic-linux.x64-21.15.0.0.0dbru.zip -d /opt/oracle
67+
sudo unzip -qo instantclient-sqlplus-linux.x64-21.15.0.0.0dbru.zip -d /opt/oracle
68+
sudo unzip -qo instantclient-sdk-linux.x64-21.15.0.0.0dbru.zip -d /opt/oracle
69+
echo "/opt/oracle/instantclient_21_15" >> $GITHUB_PATH
70+
- name: Install JDBC Driver
71+
run: |
72+
wget -q https://download.oracle.com/otn-pub/otn_software/jdbc/23261/ojdbc11.jar -O ./lib/ojdbc11.jar
73+
- name: Configure ORA_TZFILE to match Oracle 11g server
74+
run: |
75+
# Oracle 11g XE uses timezone file v14; Instant Client 21.15 embeds
76+
# v35. This mismatch causes ORA-01805 when fetching DATE/TIMESTAMP
77+
# values. Copy the v14 files from the 11g container and point the
78+
# Instant Client at them via ORA_TZFILE.
79+
ORACLE_CONTAINER="${{ job.services.oracle.id }}"
80+
sudo mkdir -p "$ORACLE_HOME/oracore/zoneinfo"
81+
docker cp "$ORACLE_CONTAINER":/u01/app/oracle/product/11.2.0/xe/oracore/zoneinfo/timezlrg_14.dat /tmp/timezlrg_14.dat
82+
docker cp "$ORACLE_CONTAINER":/u01/app/oracle/product/11.2.0/xe/oracore/zoneinfo/timezone_14.dat /tmp/timezone_14.dat
83+
sudo mv /tmp/timezlrg_14.dat "$ORACLE_HOME/oracore/zoneinfo/"
84+
sudo mv /tmp/timezone_14.dat "$ORACLE_HOME/oracore/zoneinfo/"
85+
echo "ORA_TZFILE=timezlrg_14.dat" >> $GITHUB_ENV
86+
- name: Create database user
87+
run: |
88+
./ci/setup_accounts.sh
89+
- name: Bundle install
90+
run: |
91+
bundle install --jobs 4 --retry 3
92+
- name: Run RSpec
93+
run: |
94+
RUBYOPT=-w bundle exec rspec

0 commit comments

Comments
 (0)