1- name : dbt-adapter- tests
1+ name : dbt-tests-adapter
22on : push
33
44jobs :
5- oracle-21_3_0-xe-test-suite :
5+ oracle_xe_21_3 :
66 runs-on : ${{ matrix.os }}
77 strategy :
88 fail-fast : true
99 matrix :
1010 os : [ ubuntu-latest ]
11- python-version : [ 3.7, 3.8, 3.9 ]
11+ python-version : [ ' 3.7', ' 3.8', ' 3.9', '3.10' ]
1212
1313 services :
1414 oracle_db_xe :
1515 image : container-registry.oracle.com/database/express:21.3.0-xe
1616 env :
1717 ORACLE_PWD : ${{ secrets.DBT_ORACLE_PASSWORD }}
18+ options : --name oracle_db_xe
1819 ports :
1920 - 1521:1521
2021
@@ -32,81 +33,34 @@ jobs:
3233 chmod +x ${{ github.workspace }}/.github/scripts/install_oracle_instantclient.sh
3334 ${{ github.workspace }}/.github/scripts/install_oracle_instantclient.sh
3435
35- - name : Install dbt-oracle with core dependencies
36- run : |
37- python -m pip install --upgrade pip
38- pip install pytest pytest-dbt-adapter==0.6.0
39- pip install -r requirements.txt
40- pip install -e .
41-
42- - name : Run adapter tests
36+ - name : Copy Create User script
4337 run : |
44- pytest tests/oracle.dbtspec tests/test_config.py
45- env :
46- DBT_ORACLE_USER : ${{ secrets.DBT_ORACLE_USER }}
47- DBT_ORACLE_HOST : localhost
48- DBT_ORACLE_PORT : 1521
49- DBT_ORACLE_SCHEMA : ${{ secrets.DBT_ORACLE_USER }}
50- DBT_ORACLE_PASSWORD : ${{ secrets.DBT_ORACLE_PASSWORD }}
51- DBT_ORACLE_DATABASE : XEPDB1
52- DBT_ORACLE_SERVICE : XEPDB1
53- DBT_ORACLE_PROTOCOL : tcp
54- LD_LIBRARY_PATH : /opt/oracle/instantclient_21_6
55- TNS_ADMIN : /opt/tns_admin
56-
57- oracle-21_3_0-xe-py36-test-suite :
58- runs-on : ${{ matrix.os }}
59- strategy :
60- fail-fast : true
61- matrix :
62- os : [ ubuntu-latest ]
63- python-version : [ 3.6 ]
64-
65- services :
66- oracle_db_xe :
67- image : container-registry.oracle.com/database/express:21.3.0-xe
68- env :
69- ORACLE_PWD : ${{ secrets.DBT_ORACLE_PASSWORD }}
70- ports :
71- - 1521:1521
72-
73- steps :
74- - name : Check out dbt-oracle repository code
75- uses : actions/checkout@v3
38+ chmod +x ${{ github.workspace }}/.github/scripts/create_new_user.sh
39+ docker cp ${{ github.workspace }}/.github/scripts/create_new_user.sh oracle_db_xe:/home/oracle/create_new_user.sh
7640
77- - name : Set up Python ${{ matrix.python-version }}
78- uses : actions/setup-python@v3
79- with :
80- python-version : ${{ matrix.python-version }}
81-
82- - name : Install Oracle Instantclient
41+ - name : Create dbt test user
8342 run : |
84- chmod +x ${{ github.workspace }}/.github/scripts/install_oracle_instantclient.sh
85- ${{ github.workspace }}/.github/scripts/install_oracle_instantclient.sh
43+ docker exec oracle_db_xe /home/oracle/create_new_user.sh dbt_test ${{ secrets.DBT_ORACLE_PASSWORD }}
8644
8745 - name : Install dbt-oracle with core dependencies
8846 run : |
8947 python -m pip install --upgrade pip
90- pip install pytest pytest- dbt-adapter==0.4.0
48+ pip install pytest dbt-tests- adapter==1.1.1
9149 pip install -r requirements.txt
9250 pip install -e .
9351
9452 - name : Run adapter tests
9553 run : |
96- pytest tests/oracle_py36.dbtspec tests/test_config.py
54+ pytest
9755 env :
98- DBT_ORACLE_USER : ${{ secrets.DBT_ORACLE_USER }}
56+ DBT_ORACLE_USER : DBT_TEST
9957 DBT_ORACLE_HOST : localhost
10058 DBT_ORACLE_PORT : 1521
101- DBT_ORACLE_SCHEMA : ${{ secrets.DBT_ORACLE_USER }}
59+ DBT_ORACLE_SCHEMA : DBT_TEST
10260 DBT_ORACLE_PASSWORD : ${{ secrets.DBT_ORACLE_PASSWORD }}
10361 DBT_ORACLE_DATABASE : XEPDB1
10462 DBT_ORACLE_SERVICE : XEPDB1
10563 DBT_ORACLE_PROTOCOL : tcp
10664 LD_LIBRARY_PATH : /opt/oracle/instantclient_21_6
10765 TNS_ADMIN : /opt/tns_admin
10866
109-
110-
111-
112-
0 commit comments