Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

also test azure sql #69

Merged
merged 2 commits into from
Dec 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ orbs:
python: circleci/[email protected]

jobs:
build-and-test:
integration-sqlserver:
docker:
- image: dataders/pyodbc:1.4
- image: mcr.microsoft.com/mssql/server:2019-latest
Expand All @@ -24,12 +24,24 @@ jobs:
- python/install-packages:
pkg-manager: pip
- run:
name: Test adapter against dbt-adapter-tests
command: tox -e integration-synapse
name: Test adapter on SQL Server against dbt-adapter-tests
command: tox -e integration-sqlserver
integration-azuresql:
docker:
- image: dataders/pyodbc:1.4
executor: python/default
steps:
- checkout
- python/install-packages:
pkg-manager: pip
- run:
name: Test adapter on Azure SQL against dbt-adapter-tests
command: tox -e integration-azuresql

workflows:
main:
jobs:
- build-and-test:
- integration-sqlserver
- integration-azuresql:
context:
- DBT_SYNAPSE_PROFILE
23 changes: 23 additions & 0 deletions test/integration/azuresql.dbtspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

target:
type: sqlserver
driver: "ODBC Driver 17 for SQL Server"
port: 1433
host: "{{ env_var('DBT_AZURESQL_SERVER') }}"
database: "{{ env_var('DBT_AZURESQL_DB') }}"
username: "{{ env_var('DBT_AZURESQL_UID') }}"
password: "{{ env_var('DBT_AZURESQL_PWD') }}"
schema: dbt_external_tables_integration_tests_azuresql
encrypt: yes
trust_cert: yes
threads: 1
sequences:
test_dbt_empty: empty
test_dbt_base: base
test_dbt_ephemeral: ephemeral
test_dbt_incremental: incremental
test_dbt_snapshot_strategy_timestamp: snapshot_strategy_timestamp
# test_dbt_snapshot_strategy_check_cols: snapshot_strategy_check_cols
test_dbt_data_test: data_test
test_dbt_schema_test: schema_test
# test_dbt_ephemeral_data_tests: data_test_ephemeral_models
13 changes: 10 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
[tox]
skipsdist = True
envlist = unit, flake8, integration-synapse
envlist = unit, flake8, integration-sqlserver, integration-synapse

[testenv:integration-synapse]
[testenv:integration-sqlserver]
basepython = python3
commands = /bin/bash -c '{envpython} -m pytest -v test/integration/sqlserver.dbtspec'
passenv = DBT_SYNAPSE_DB DBT_SYNAPSE_PORT DBT_SYNAPSE_PWD DBT_SYNAPSE_SERVER DBT_SYNAPSE_UID
deps =
-r{toxinidir}/requirements.txt
-e.

[testenv:integration-azuresql]
basepython = python3
commands = /bin/bash -c '{envpython} -m pytest -v test/integration/azuresql.dbtspec'
passenv = DBT_AZURESQL_DB DBT_AZURESQL_PWD DBT_AZURESQL_SERVER DBT_AZURESQL_UID
deps =
-r{toxinidir}/requirements.txt
-e.