Skip to content

Commit 6382aa4

Browse files
tanbroclaude
andcommitted
ci: add Oracle database testing to GitHub Actions
Use gvenzl/setup-oracle-free@v1 action instead of service container for better reliability. Add Oracle test URLs to both sync and async test environments. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2a9752c commit 6382aa4

1 file changed

Lines changed: 10 additions & 19 deletions

File tree

.github/workflows/python-package.yml

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -119,22 +119,8 @@ jobs:
119119
ports:
120120
- 5432:5432
121121

122-
# TODO: Oracle healthcheck is not working in GitHub Actions
123-
# Requires investigation of sqlplus availability
124-
# oracle:
125-
# # Use community Oracle XE image optimized for CI/CD
126-
# # See: https://github.com/gvenzl/oracle-xe
127-
# image: gvenzl/oracle-xe:21-slim-faststart
128-
# env:
129-
# ORACLE_PASSWORD: "YourStrong@Passw0rd"
130-
# options: >-
131-
# --health-cmd /healthcheck.sh
132-
# --health-interval 10s
133-
# --health-timeout 120s
134-
# --health-retries 10
135-
# --health-start-period 60s
136-
# ports:
137-
# - 1521:1521
122+
# NOTE: Oracle is set up via gvenzl/setup-oracle-free@v1 action
123+
# instead of service container, for better reliability
138124

139125
steps:
140126
- uses: actions/checkout@v6
@@ -154,6 +140,12 @@ jobs:
154140
enable-cache: true
155141
python-version: ${{ matrix.python-version }}
156142

143+
- name: Setup Oracle Database
144+
uses: gvenzl/setup-oracle-free@v1
145+
with:
146+
app-user: test
147+
app-user-password: test
148+
157149
- name: Install the project
158150
env:
159151
SETUPTOOLS_SCM_PRETEND_VERSION: "0"
@@ -164,9 +156,8 @@ jobs:
164156
- name: Run tests
165157
shell: bash
166158
env:
167-
TEST_URLS: mysql://test:test@127.0.0.1:3306/test postgresql://postgres:test@127.0.0.1:5432/ mssql+pyodbc://sa:YourStrongPassword123@127.0.0.1:1433/master?driver=ODBC+Driver+18+for+SQL+Server&TrustServerCertificate=yes
168-
TEST_ASYNC_URLS: mysql+aiomysql://test:test@127.0.0.1:3306/test postgresql+asyncpg://postgres:test@127.0.0.1:5432/ mssql+aioodbc://sa:YourStrongPassword123@127.0.0.1:1433/master?driver=ODBC+Driver+18+for+SQL+Server&TrustServerCertificate=yes
169-
# Oracle: oracle+oracledb://sys:YourStrong@Passw0rd@127.0.0.1:1521/?service_name=XEPDB1
159+
TEST_URLS: mysql://test:test@127.0.0.1:3306/test postgresql://postgres:test@127.0.0.1:5432/ mssql+pyodbc://sa:YourStrongPassword123@127.0.0.1:1433/master?driver=ODBC+Driver+18+for+SQL+Server&TrustServerCertificate=yes oracle+oracledb://test:test@127.0.0.1:1521/?service_name=FREEPDB1
160+
TEST_ASYNC_URLS: mysql+aiomysql://test:test@127.0.0.1:3306/test postgresql+asyncpg://postgres:test@127.0.0.1:5432/ mssql+aioodbc://sa:YourStrongPassword123@127.0.0.1:1433/master?driver=ODBC+Driver+18+for+SQL+Server&TrustServerCertificate=yes oracle+oracledb://test:test@127.0.0.1:1521/?service_name=FREEPDB1
170161
run: |
171162
uv run --no-dev coverage run -m unittest -cfv
172163
uv run --no-dev coverage report -m

0 commit comments

Comments
 (0)