Skip to content

Strip precision from TIMESTAMP data types in %ROWTYPE fields #178

Strip precision from TIMESTAMP data types in %ROWTYPE fields

Strip precision from TIMESTAMP data types in %ROWTYPE fields #178

Workflow file for this run

name: test_11g
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
jobs:
build:
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
ruby: [
'4.0',
'3.4',
'3.3',
'3.2'
]
env:
ORACLE_HOME: /opt/oracle/instantclient_21_15
LD_LIBRARY_PATH: /opt/oracle/instantclient_21_15
NLS_LANG: AMERICAN_AMERICA.AL32UTF8
TNS_ADMIN: ./ci/network/admin
DATABASE_NAME: XE
TZ: Europe/Riga
DATABASE_SYS_PASSWORD: Oracle18
services:
oracle:
image: gvenzl/oracle-xe:11
ports:
- 1521:1521
env:
TZ: Europe/Riga
ORACLE_PASSWORD: Oracle18
options: >-
--health-cmd healthcheck.sh
--health-interval 10s
--health-timeout 5s
--health-retries 10
steps:
- uses: actions/checkout@v6
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Create symbolic link for libaio library compatibility
run: |
sudo ln -s /usr/lib/x86_64-linux-gnu/libaio.so.1t64 /usr/lib/x86_64-linux-gnu/libaio.so.1
- name: Download Oracle instant client
run: |
wget -q https://download.oracle.com/otn_software/linux/instantclient/2115000/instantclient-basic-linux.x64-21.15.0.0.0dbru.zip
wget -q https://download.oracle.com/otn_software/linux/instantclient/2115000/instantclient-sqlplus-linux.x64-21.15.0.0.0dbru.zip
wget -q https://download.oracle.com/otn_software/linux/instantclient/2115000/instantclient-sdk-linux.x64-21.15.0.0.0dbru.zip
- name: Install Oracle instant client
run: |
sudo mkdir -p /opt/oracle/
sudo unzip -q instantclient-basic-linux.x64-21.15.0.0.0dbru.zip -d /opt/oracle
sudo unzip -qo instantclient-sqlplus-linux.x64-21.15.0.0.0dbru.zip -d /opt/oracle
sudo unzip -qo instantclient-sdk-linux.x64-21.15.0.0.0dbru.zip -d /opt/oracle
echo "/opt/oracle/instantclient_21_15" >> $GITHUB_PATH
- name: Install JDBC Driver
run: |
wget -q https://download.oracle.com/otn-pub/otn_software/jdbc/233/ojdbc11.jar -O ./lib/ojdbc11.jar
- name: Configure ORA_TZFILE to match Oracle 11g server
run: |
# Oracle 11g XE uses timezone file v14; Instant Client 21.15 embeds v35.
# This mismatch causes ORA-01805 when ruby-oci8 fetches DATE/TIMESTAMP
# values. Copy the v14 files from the 11g container and point the
# Instant Client at them via ORA_TZFILE.
ORACLE_CONTAINER=$(docker ps --filter "ancestor=gvenzl/oracle-xe:11" -q)
sudo mkdir -p /opt/oracle/instantclient_21_15/oracore/zoneinfo
docker cp "$ORACLE_CONTAINER":/u01/app/oracle/product/11.2.0/xe/oracore/zoneinfo/timezlrg_14.dat /tmp/timezlrg_14.dat
docker cp "$ORACLE_CONTAINER":/u01/app/oracle/product/11.2.0/xe/oracore/zoneinfo/timezone_14.dat /tmp/timezone_14.dat
sudo mv /tmp/timezlrg_14.dat /opt/oracle/instantclient_21_15/oracore/zoneinfo/
sudo mv /tmp/timezone_14.dat /opt/oracle/instantclient_21_15/oracore/zoneinfo/
echo "ORA_TZFILE=timezlrg_14.dat" >> $GITHUB_ENV
- name: Create database user
run: |
./ci/setup_accounts.sh
- name: Bundle install
run: |
bundle install --jobs 4 --retry 3
- name: Run RSpec
run: |
RUBYOPT=-w bundle exec rspec