-
Notifications
You must be signed in to change notification settings - Fork 61
83 lines (78 loc) · 2.48 KB
/
test.yml
File metadata and controls
83 lines (78 loc) · 2.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: test
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
continue-on-error: false
strategy:
matrix:
ruby: [
'4.0',
'3.4',
'3.3',
'3.2',
'jruby-10.1.0.0',
]
env:
NLS_LANG: AMERICAN_AMERICA.AL32UTF8
TNS_ADMIN: ./ci/network/admin
DATABASE_NAME: FREEPDB1
TZ: Europe/Riga
DATABASE_SYS_PASSWORD: Oracle18
services:
oracle:
image: gvenzl/oracle-free:latest
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 Java
if: startsWith(matrix.ruby, 'jruby')
uses: actions/setup-java@v5
with:
distribution: oracle
java-version: '21'
- 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/instantclient-basic-linuxx64.zip
wget -q https://download.oracle.com/otn_software/linux/instantclient/instantclient-sdk-linuxx64.zip
wget -q https://download.oracle.com/otn_software/linux/instantclient/instantclient-sqlplus-linuxx64.zip
- name: Install Oracle instant client
run: |
sudo unzip -q instantclient-basic-linuxx64.zip -d /opt/oracle/
sudo unzip -qo instantclient-sdk-linuxx64.zip -d /opt/oracle/
sudo unzip -qo instantclient-sqlplus-linuxx64.zip -d /opt/oracle/
ORACLE_HOME=$(find /opt/oracle -name "instantclient_*" -type d | head -1)
echo "ORACLE_HOME=$ORACLE_HOME" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$ORACLE_HOME" >> $GITHUB_ENV
echo "$ORACLE_HOME" >> $GITHUB_PATH
- name: Install JDBC Driver
if: startsWith(matrix.ruby, 'jruby')
run: |
cp "$ORACLE_HOME/ojdbc17.jar" ./lib/ojdbc17.jar
- 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