Skip to content

Commit

Permalink
Chore(#39): Add Oracle action job check
Browse files Browse the repository at this point in the history
Add Oracle action job against Pytest for validity
Add test condn in test module for oracle
Add Cx-Oracle requirement in test.txt
  • Loading branch information
indiVar0508 committed Nov 15, 2022
1 parent 26ebbc0 commit 786edbe
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,33 @@ jobs:
run: pytest
env:
DB: mssql

test-oracle:
needs:
- prepare_matrix
name: test-python${{ matrix.python-version }}-oracle
strategy:
matrix:
python-version: ${{ fromJson(needs.prepare_matrix.outputs.python-version) }}
services:
mssql:
image: gvenzl/oracle-xe
ports:
- 1521:1521
env:
ORACLE_PASSWORD: p#ssw0rd
options: >-
--health-cmd healthcheck.sh
--health-interval 10s
--health-timeout 5s
--health-retries 3
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: psf/black@stable
- name: Build
run: pip3 install -e . -r requirements/test.txt
- name: Run tests
run: pytest
env:
DB: oracle
3 changes: 2 additions & 1 deletion requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ flexmock>=0.9.7
psycopg2-binary>=2.4.6
PyMySQL>=0.8.0
sqlalchemy_i18n
pymssql>=2.2.0
pymssql>=2.2.0
cx-Oracle
2 changes: 2 additions & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ def get_dns_from_driver(driver):
return "sqlite:///:memory:"
elif driver == "mssql":
return "mssql+pymssql://sa:MSsql2022@localhost:1433"
elif driver == "oracle":
return "oracle://SYSTEM:p#ssw0rd@localhost:1521"
else:
raise Exception("Unknown driver given: %r" % driver)

Expand Down

0 comments on commit 786edbe

Please sign in to comment.