Skip to content

Use documentation formatter for rspec in devcontainer CI #2932

Use documentation formatter for rspec in devcontainer CI

Use documentation formatter for rspec in devcontainer CI #2932

Workflow file for this run

name: test_11g
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
build:
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: [
'4.0',
'3.4',
'3.3',
'jruby-10.1.0.0',
]
include:
- ruby: 'jruby-10.1.0.0'
jruby_opts: '--dev'
env:
CI: true
JRUBY_OPTS: ${{ matrix.jruby_opts }}
ORACLE_HOME: /opt/oracle/instantclient_21_21
LD_LIBRARY_PATH: /opt/oracle/instantclient_21_21
NLS_LANG: AMERICAN_AMERICA.AL32UTF8
TNS_ADMIN: ./ci/network/admin
DATABASE_NAME: XE
TZ: Europe/Riga
DATABASE_SYS_PASSWORD: Oracle18
DATABASE_HOST: localhost
DATABASE_PORT: 1521
DATABASE_VERSION: 11.2.0.2
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/2121000/instantclient-basic-linux.x64-21.21.0.0.0dbru.zip
wget -q https://download.oracle.com/otn_software/linux/instantclient/2121000/instantclient-sqlplus-linux.x64-21.21.0.0.0dbru.zip
wget -q https://download.oracle.com/otn_software/linux/instantclient/2121000/instantclient-sdk-linux.x64-21.21.0.0.0dbru.zip
- name: Install Oracle instant client
run: |
sudo mkdir -p /opt/oracle/
sudo unzip -q instantclient-basic-linux.x64-21.21.0.0.0dbru.zip -d /opt/oracle
sudo unzip -qo instantclient-sqlplus-linux.x64-21.21.0.0.0dbru.zip -d /opt/oracle
sudo unzip -qo instantclient-sdk-linux.x64-21.21.0.0.0dbru.zip -d /opt/oracle
echo "/opt/oracle/instantclient_21_21" >> $GITHUB_PATH
- name: Install JDBC Driver
run: |
wget -q https://download.oracle.com/otn-pub/otn_software/jdbc/23261/ojdbc17.jar -O ./lib/ojdbc17.jar
- name: Configure ORA_TZFILE to match Oracle 11g server
run: |
# Oracle 11g XE uses timezone file v14; the 21.x Instant Client
# embeds a newer file. The mismatch causes ORA-01805 when fetching
# DATE/TIMESTAMP values. Copy the v14 files from the 11g container
# and point the Instant Client at them via ORA_TZFILE.
ORACLE_CONTAINER="${{ job.services.oracle.id }}"
sudo mkdir -p "$ORACLE_HOME/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 "$ORACLE_HOME/oracore/zoneinfo/"
sudo mv /tmp/timezone_14.dat "$ORACLE_HOME/oracore/zoneinfo/"
echo "ORA_TZFILE=timezlrg_14.dat" >> $GITHUB_ENV
- name: Create database user
run: |
./ci/setup_accounts.sh
- name: Update RubyGems
run: |
gem update --system || gem update --system 3.4.22
- name: Bundle install
run: |
bundle install --jobs 4 --retry 3
- name: Show Gemfile.lock
run: |
cat Gemfile.lock
- name: Run RSpec
run: |
bundle exec rspec
- name: Run bug report templates
run: |
cd guides/bug_report_templates
ruby active_record_gem.rb
ruby active_record_gem_spec.rb