Skip to content

Commit

Permalink
Merge pull request #2352 from yahonda/use_oci-oracle-free
Browse files Browse the repository at this point in the history
Use `gvenzl/oracle-free:latest` to run `Oracle Database 23c Free`
  • Loading branch information
yahonda authored Sep 28, 2023
2 parents 03643c0 + bfa164d commit deb214d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
29 changes: 16 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@ jobs:
'2.7'
]
env:
ORACLE_HOME: /usr/lib/oracle/21/client64
LD_LIBRARY_PATH: /usr/lib/oracle/21/client64/lib
ORACLE_HOME: /opt/oracle/instantclient_23_3
LD_LIBRARY_PATH: /opt/oracle/instantclient_23_3
NLS_LANG: AMERICAN_AMERICA.AL32UTF8
TNS_ADMIN: ./ci/network/admin
DATABASE_NAME: XEPDB1
DATABASE_NAME: FREEPDB1
TZ: Europe/Riga
DATABASE_SYS_PASSWORD: Oracle18
DATABASE_HOST: localhost
DATABASE_PORT: 1521

services:
oracle:
image: gvenzl/oracle-xe:latest
image: gvenzl/oracle-free:latest
ports:
- 1521:1521
env:
Expand All @@ -54,25 +54,28 @@ jobs:
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Install required package
run: |
sudo apt-get install alien
- name: Download Oracle instant client
run: |
wget -q https://download.oracle.com/otn_software/linux/instantclient/2111000/oracle-instantclient-basic-21.11.0.0.0-1.x86_64.rpm
wget -q https://download.oracle.com/otn_software/linux/instantclient/2111000/oracle-instantclient-sqlplus-21.11.0.0.0-1.x86_64.rpm
wget -q https://download.oracle.com/otn_software/linux/instantclient/2111000/oracle-instantclient-devel-21.11.0.0.0-1.x86_64.rpm
wget -q https://download.oracle.com/otn_software/linux/instantclient/23c/instantclient-basic-linux.x64-23.3.0.0.0.zip
wget -q https://download.oracle.com/otn_software/linux/instantclient/23c/instantclient-sdk-linux.x64-23.3.0.0.0.zip
wget -q https://download.oracle.com/otn_software/linux/instantclient/23c/instantclient-sqlplus-linux.x64-23.3.0.0.0.zip
- name: Install Oracle instant client
run: |
sudo alien -i oracle-instantclient-basic-21.11.0.0.0-1.x86_64.rpm
sudo alien -i oracle-instantclient-sqlplus-21.11.0.0.0-1.x86_64.rpm
sudo alien -i oracle-instantclient-devel-21.11.0.0.0-1.x86_64.rpm
sudo mkdir -p /opt/oracle/
sudo unzip instantclient-basic-linux.x64-23.3.0.0.0.zip -d /opt/oracle/
sudo unzip -o instantclient-sdk-linux.x64-23.3.0.0.0.zip -d /opt/oracle/
sudo unzip -o instantclient-sqlplus-linux.x64-23.3.0.0.0.zip -d /opt/oracle/
echo "/opt/oracle/instantclient_23_3" >> $GITHUB_PATH
- name: Install JDBC Driver
run: |
wget -q https://download.oracle.com/otn-pub/otn_software/jdbc/211/ojdbc11.jar -O ./lib/ojdbc11.jar
- name: Create database user
run: |
./ci/setup_accounts.sh
- name: Update RubyGems
run: |
gem update --system
- name: Bundle install
run: |
bundle install --jobs 4 --retry 3
Expand Down
4 changes: 2 additions & 2 deletions ci/network/admin/tnsnames.ora
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
XEPDB1 =
FREEPDB1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = XEPDB1)
(SERVICE_NAME = FREEPDB1)
)
)

Expand Down
2 changes: 1 addition & 1 deletion ci/setup_accounts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -ev

${ORACLE_HOME}/bin/sqlplus system/${DATABASE_SYS_PASSWORD}@${DATABASE_NAME} <<SQL
sqlplus system/${DATABASE_SYS_PASSWORD}@${DATABASE_NAME} <<SQL
@@spec/support/alter_system_set_open_cursors.sql
@@spec/support/create_oracle_enhanced_users.sql
exit
Expand Down

0 comments on commit deb214d

Please sign in to comment.