Skip to content

Commit

Permalink
Merge pull request #69 from dbt-msft/also_test_azuresql
Browse files Browse the repository at this point in the history
also test azure sql
  • Loading branch information
mikaelene authored Dec 17, 2020
2 parents 818409c + 7f680e4 commit 0df67bf
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 7 deletions.
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.

0 comments on commit 0df67bf

Please sign in to comment.