Skip to content

Commit 3f1cce3

Browse files
committed
Update Oracle CI
1 parent 2e6315a commit 3f1cce3

File tree

6 files changed

+110
-48
lines changed

6 files changed

+110
-48
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ jobs:
3737

3838
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
3939
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.rails }}_with_${{ matrix.adapter }}.gemfile
40-
ORACLE_COOKIE: sqldev
41-
ORACLE_FILE: oracle11g/xe/oracle-xe-11.2.0-1.0.x86_64.rpm.zip
42-
ORACLE_HOME: /u01/app/oracle/product/11.2.0/xe
43-
ORACLE_SID: XE
4440

4541
services:
4642
postgres:
@@ -86,7 +82,6 @@ jobs:
8682
- sqlite3
8783
- postgresql
8884
- mysql2
89-
# - oracle_enhanced
9085
- postgis
9186
# Disabled for now:
9287
# Rails 7.0: trilogy_auth_recv: caching_sha2_password requires either TCP with TLS or a unix socket: TRILOGY_UNSUPPORTED
@@ -98,28 +93,13 @@ jobs:
9893
- rails: 'rails_8.0'
9994
ruby: '3.1'
10095

101-
# Disabled for now because of build error:
102-
# /opt/hostedtoolcache/Ruby/3.0.7/x64/lib/ruby/3.0.0/psych.rb:457:in
103-
# `parse_stream': undefined method `parse' for #<Psych::Parser:0x000055b6cc7b6898
104-
# @handler=#<Psych::Handlers::DocumentStream:0x000055b6cc7b69b0 @stack=[],
105-
# @last=nil, @root=nil, @start_line=nil, @start_column=nil, @end_line=nil,
106-
# @end_column=nil, @block=#<Proc:0x000055b6cc7b68e8
107-
# /opt/hostedtoolcache/Ruby/3.0.7/x64/lib/ruby/3.0.0/psych.rb:391>>,
108-
# @external_encoding=0> (NoMethodError)
109-
# from
110-
# /home/runner/work/ajax-datatables-rails/ajax-datatables-rails/vendor/bundle/ruby/3.0.0/gems/ruby-oci8-2.2.14/ext/oci8/apiwrap.rb:64:in
111-
# `create_apiwrap'
112-
- rails: 'rails_7.2'
113-
adapter: 'oracle_enhanced'
114-
11596
steps:
11697
- name: Checkout
11798
uses: actions/checkout@v4
11899

119100
- name: Set DB Adapter
120101
env:
121102
DB_ADAPTER: ${{ matrix.adapter }}
122-
CUSTOM_ORACLE_FILE: ${{ secrets.CUSTOM_ORACLE_FILE }}
123103

124104
# See: https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md#mysql
125105
run: |
@@ -128,12 +108,6 @@ jobs:
128108
mysql -u root -proot -e 'create database ajax_datatables_rails;'
129109
fi
130110
131-
if [[ "${DB_ADAPTER}" == "oracle_enhanced" ]]; then
132-
./spec/install_oracle.sh
133-
# Fix error : libnnz11.so: cannot open shared object file: No such file or directory
134-
sudo ln -s ${ORACLE_HOME}/lib/libnnz11.so /usr/lib/libnnz11.so
135-
fi
136-
137111
- name: Setup Ruby
138112
uses: ruby/setup-ruby@v1
139113
with:

.github/workflows/ci_oracle.yml

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
---
2+
name: CI Oracle
3+
4+
on:
5+
push:
6+
branches:
7+
- '**'
8+
pull_request:
9+
branches:
10+
- '**'
11+
schedule:
12+
- cron: '0 4 1 * *'
13+
# Run workflow manually
14+
workflow_dispatch:
15+
16+
jobs:
17+
rspec:
18+
runs-on: ubuntu-latest
19+
20+
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
21+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.rails }}_with_${{ matrix.adapter }}.gemfile
22+
ORACLE_HOME: /opt/oracle/instantclient_23_8
23+
LD_LIBRARY_PATH: /opt/oracle/instantclient_23_8
24+
25+
services:
26+
oracle:
27+
image: gvenzl/oracle-free:latest
28+
ports:
29+
- 1521:1521
30+
env:
31+
TZ: Europe/Paris
32+
ORACLE_PASSWORD: Oracle18
33+
options: >-
34+
--health-cmd healthcheck.sh
35+
--health-interval 10s
36+
--health-timeout 5s
37+
--health-retries 10
38+
39+
strategy:
40+
fail-fast: false
41+
matrix:
42+
ruby:
43+
- '3.4'
44+
# - '3.3'
45+
# - '3.2'
46+
# - '3.1'
47+
# - 'head'
48+
rails:
49+
- rails_8.0
50+
# - rails_7.2
51+
# - rails_7.1
52+
adapter:
53+
- oracle_enhanced
54+
# exclude:
55+
# # Disabled for now because of build error:
56+
# # /opt/hostedtoolcache/Ruby/3.0.7/x64/lib/ruby/3.0.0/psych.rb:457:in
57+
# # `parse_stream': undefined method `parse' for #<Psych::Parser:0x000055b6cc7b6898
58+
# # @handler=#<Psych::Handlers::DocumentStream:0x000055b6cc7b69b0 @stack=[],
59+
# # @last=nil, @root=nil, @start_line=nil, @start_column=nil, @end_line=nil,
60+
# # @end_column=nil, @block=#<Proc:0x000055b6cc7b68e8
61+
# # /opt/hostedtoolcache/Ruby/3.0.7/x64/lib/ruby/3.0.0/psych.rb:391>>,
62+
# # @external_encoding=0> (NoMethodError)
63+
# # from
64+
# # /home/runner/work/ajax-datatables-rails/ajax-datatables-rails/vendor/bundle/ruby/3.0.0/gems/ruby-oci8-2.2.14/ext/oci8/apiwrap.rb:64:in
65+
# # `create_apiwrap'
66+
# - rails: 'rails_7.2'
67+
# adapter: 'oracle_enhanced'
68+
69+
steps:
70+
- name: Checkout
71+
uses: actions/checkout@v4
72+
73+
- name: Create symbolic link for libaio library compatibility
74+
run: |
75+
sudo ln -s /usr/lib/x86_64-linux-gnu/libaio.so.1t64 /usr/lib/x86_64-linux-gnu/libaio.so.1
76+
77+
- name: Download Oracle instant client
78+
run: |
79+
wget -q https://download.oracle.com/otn_software/linux/instantclient/2380000/instantclient-basic-linux.x64-23.8.0.25.04.zip
80+
wget -q https://download.oracle.com/otn_software/linux/instantclient/2380000/instantclient-sdk-linux.x64-23.8.0.25.04.zip
81+
wget -q https://download.oracle.com/otn_software/linux/instantclient/2380000/instantclient-sqlplus-linux.x64-23.8.0.25.04.zip
82+
- name: Install Oracle instant client
83+
run: |
84+
sudo unzip instantclient-basic-linux.x64-23.8.0.25.04.zip -d /opt/oracle/
85+
sudo unzip -o instantclient-sdk-linux.x64-23.8.0.25.04.zip -d /opt/oracle/
86+
sudo unzip -o instantclient-sqlplus-linux.x64-23.8.0.25.04.zip -d /opt/oracle/
87+
echo "/opt/oracle/instantclient_23_8" >> $GITHUB_PATH
88+
89+
- name: Setup Ruby
90+
uses: ruby/setup-ruby@v1
91+
with:
92+
ruby-version: ${{ matrix.ruby }}
93+
bundler-cache: true
94+
env:
95+
DB_ADAPTER: ${{ matrix.adapter }}
96+
97+
- name: Run RSpec
98+
env:
99+
DB_ADAPTER: ${{ matrix.adapter }}
100+
run: bin/rspec
101+
102+
- name: Publish code coverage
103+
uses: qltysh/qlty-action/coverage@v1
104+
with:
105+
token: ${{ secrets.QLTY_COVERAGE_TOKEN }}
106+
files: coverage/coverage.json

Appraisals

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ end
6868

6969
appraise 'rails_7.2_with_oracle_enhanced' do
7070
gem 'rails', '~> 7.2.0'
71-
gem 'activerecord-oracle_enhanced-adapter', git: 'https://github.com/rsim/oracle-enhanced.git'
71+
gem 'activerecord-oracle_enhanced-adapter', '~> 7.2.0'
7272
remove_gem 'pg'
7373
end
7474

@@ -107,7 +107,7 @@ end
107107

108108
appraise 'rails_8.0_with_oracle_enhanced' do
109109
gem 'rails', '~> 8.0.0'
110-
gem 'activerecord-oracle_enhanced-adapter', git: 'https://github.com/rsim/oracle-enhanced.git'
110+
gem 'activerecord-oracle_enhanced-adapter', '~> 8.0.0'
111111
remove_gem 'pg'
112112
end
113113

gemfiles/rails_7.2_with_oracle_enhanced.gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ gem "rubocop-performance", require: false
2020
gem "rubocop-rake", require: false
2121
gem "rubocop-rspec", require: false
2222
gem "rails", "~> 7.2.0"
23-
gem "activerecord-oracle_enhanced-adapter", git: "https://github.com/rsim/oracle-enhanced.git"
23+
gem "activerecord-oracle_enhanced-adapter", "~> 7.2.0"
2424

2525
gemspec path: "../"

gemfiles/rails_8.0_with_oracle_enhanced.gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ gem "rubocop-performance", require: false
2020
gem "rubocop-rake", require: false
2121
gem "rubocop-rspec", require: false
2222
gem "rails", "~> 8.0.0"
23-
gem "activerecord-oracle_enhanced-adapter", git: "https://github.com/rsim/oracle-enhanced.git"
23+
gem "activerecord-oracle_enhanced-adapter", "~> 8.0.0"
2424

2525
gemspec path: "../"

spec/install_oracle.sh

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

0 commit comments

Comments
 (0)