Skip to content

Commit 9d61e90

Browse files
tanbroclaude
andcommitted
ci: use gvenzl/oracle-free:full image for Oracle tests
The 'full' flavor contains all Oracle Database functionality including DBMS_LOCK package which is required for distributed lock testing. The default (slim) image may not include all packages. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent acde72c commit 9d61e90

1 file changed

Lines changed: 2 additions & 26 deletions

File tree

.github/workflows/python-package.yml

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -143,48 +143,24 @@ jobs:
143143
- name: Setup Oracle Database
144144
uses: gvenzl/setup-oracle-free@v1
145145
with:
146+
tag: full
146147
app-user: test
147148
app-user-password: test
148149

149-
- name: Grant DBMS_LOCK permission to test user
150-
run: |
151-
podman exec oracledb sqlplus -s / as sysdba <<'EOF'
152-
ALTER SESSION SET "_ORACLE_SCRIPT"=TRUE;
153-
ALTER SESSION SET CONTAINER=FREEPDB1;
154-
GRANT EXECUTE ON SYS.DBMS_LOCK TO test;
155-
exit;
156-
EOF
157-
158150
- name: Install the project
159151
env:
160152
SETUPTOOLS_SCM_PRETEND_VERSION: "0"
161153
run: |
162154
uv sync --no-dev --group test
163155
uv pip install mysqlclient aiomysql psycopg2 asyncpg pyodbc aioodbc oracledb
164156
165-
- name: Check and Grant DBMS_LOCK permission
157+
- name: Grant DBMS_LOCK permission to test user
166158
run: |
167-
echo "=== Checking if DBMS_LOCK exists ==="
168159
podman exec oracledb sqlplus -s / as sysdba <<'EOF'
169-
SET PAGESIZE 100
170-
SET LINESIZE 200
171-
SET FEEDBACK ON
172-
ALTER SESSION SET "_ORACLE_SCRIPT"=TRUE;
173160
ALTER SESSION SET CONTAINER=FREEPDB1;
174-
PROMPT === Objects named DBMS_LOCK ===
175-
SELECT object_name, object_type, status FROM all_objects WHERE object_name LIKE '%DBMS_LOCK%' AND owner = 'SYS' ORDER BY object_name;
176-
PROMPT === Testing DBMS_LOCK.REQUEST directly as SYS ===
177-
SELECT DBMS_LOCK.REQUEST(id => 123, lockmode => 6, timeout => 1) AS test_result FROM DUAL;
178-
PROMPT === Granting permission ===
179161
GRANT EXECUTE ON SYS.DBMS_LOCK TO test;
180-
PROMPT === Checking granted permissions ===
181-
SELECT grantee, owner, table_name, privilege FROM dba_tab_privs WHERE table_name = 'DBMS_LOCK' AND grantee = 'TEST';
182-
PROMPT === Testing as test user ===
183-
CONNECT test/test@FREEPDB1;
184-
SELECT DBMS_LOCK.REQUEST(id => 123, lockmode => 6, timeout => 1) AS test_result FROM DUAL;
185162
exit;
186163
EOF
187-
echo "=== Grant completed ==="
188164
189165
- name: Run tests
190166
shell: bash

0 commit comments

Comments
 (0)