Skip to content

Commit dfe7572

Browse files
authored
Merge branch 'brooklyn-data:main' into REDSHIFT_SUPPORT
2 parents 2be379f + 91d0a6e commit dfe7572

File tree

4 files changed

+139
-9
lines changed

4 files changed

+139
-9
lines changed

.github/workflows/ci_test_package.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,3 +193,82 @@ jobs:
193193
# env:
194194
# DBT_VERSION: ''
195195
# run: tox -e integration_databricks
196+
197+
integration-sqlserver:
198+
strategy:
199+
fail-fast: false # Don't fail one DWH if the others fail
200+
runs-on: ubuntu-latest
201+
environment:
202+
name: Approve Integration Tests
203+
204+
steps:
205+
- uses: actions/setup-python@v4
206+
with:
207+
python-version: "3.8.x"
208+
architecture: "x64"
209+
- name: Install SQL Server
210+
uses: Particular/install-sql-server-action@v1.2.0
211+
with:
212+
connection-string-env-var: SQL_SERVER_CONNECTION_STRING
213+
catalog: dbt_artifact_integrationtests
214+
- name: Create DBT User
215+
shell: pwsh
216+
run: |
217+
echo "Create dbt login with sysadmin"
218+
sqlcmd -Q "CREATE LOGIN dbt WITH PASSWORD = '123', CHECK_POLICY = OFF, CHECK_EXPIRATION = OFF" -d "dbt_artifact_integrationtests"
219+
sqlcmd -Q "ALTER SERVER ROLE sysadmin ADD MEMBER dbt" -d "dbt_artifact_integrationtests"
220+
- name: Install tox
221+
run: python3 -m pip install tox
222+
223+
- name: Install Microsoft ODBC
224+
run: sudo ACCEPT_EULA=Y apt-get install msodbcsql18 -y
225+
226+
- name: Checkout
227+
uses: actions/checkout@v3
228+
with:
229+
ref: ${{ github.event.pull_request.head.sha }} # Check out the code of the PR
230+
231+
- name: Run Tests on PR
232+
env:
233+
DBT_VERSION: ${{ matrix.version }}
234+
run: tox -e integration_sqlserver
235+
236+
integration-sqlserver-single-run:
237+
strategy:
238+
fail-fast: false # Don't fail one DWH if the others fail
239+
matrix:
240+
# When supporting a new version, update the list here
241+
version: ["1_3_0", "1_4_0", "1_7_0", "1_8_0"]
242+
run: tox -e integration_sqlserver_${{ matrix.version }}
243+
runs-on: ubuntu-latest
244+
environment:
245+
name: Approve Integration Tests
246+
247+
steps:
248+
- uses: actions/setup-python@v4
249+
with:
250+
python-version: "3.8.x"
251+
architecture: "x64"
252+
- name: Install SQL Server
253+
uses: Particular/install-sql-server-action@v1.2.0
254+
with:
255+
connection-string-env-var: SQL_SERVER_CONNECTION_STRING
256+
catalog: dbt_artifact_integrationtests
257+
- name: Create DBT User
258+
shell: pwsh
259+
run: |
260+
echo "Create dbt login with sysadmin"
261+
sqlcmd -Q "CREATE LOGIN dbt WITH PASSWORD = '123', CHECK_POLICY = OFF, CHECK_EXPIRATION = OFF" -d "dbt_artifact_integrationtests"
262+
sqlcmd -Q "ALTER SERVER ROLE sysadmin ADD MEMBER dbt" -d "dbt_artifact_integrationtests"
263+
- name: Install tox
264+
run: python3 -m pip install tox
265+
- name: Install Microsoft ODBC
266+
run: sudo ACCEPT_EULA=Y apt-get install msodbcsql18 -y
267+
- name: Checkout
268+
uses: actions/checkout@v3
269+
with:
270+
ref: ${{ github.event.pull_request.head.sha }} # Check out the code of the PR
271+
- name: Run Tests on PR
272+
env:
273+
DBT_VERSION: ${{ matrix.version }}
274+
run: tox -e integration_sqlserver_${{ matrix.version }}

.github/workflows/main_test_package.yml

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
integration:
3535
strategy:
3636
matrix:
37-
warehouse: ["snowflake", "bigquery", "postgres", "sqlserver"]
37+
warehouse: ["snowflake", "bigquery", "postgres"]
3838
version: ["1_3_0", "1_4_0", "1_5_0", "1_6_0", "1_7_0", "1_8_0"]
3939
runs-on: ubuntu-latest
4040
permissions:
@@ -102,3 +102,45 @@ jobs:
102102

103103
# - name: Run Databricks Tests
104104
# run: tox -e integration_databricks
105+
106+
integration-sqlserver:
107+
strategy:
108+
fail-fast: false # Don't fail one DWH if the others fail
109+
matrix:
110+
# When supporting a new version, update the list here
111+
version: ["1_3_0", "1_4_0", "1_7_0", "1_8_0"]
112+
runs-on: ubuntu-latest
113+
environment:
114+
name: Approve Integration Tests
115+
116+
steps:
117+
- uses: actions/setup-python@v4
118+
with:
119+
python-version: "3.8.x"
120+
architecture: "x64"
121+
- name: Install SQL Server
122+
uses: Particular/install-sql-server-action@v1.2.0
123+
with:
124+
connection-string-env-var: SQL_SERVER_CONNECTION_STRING
125+
catalog: dbt_artifact_integrationtests
126+
- name: Create DBT User
127+
shell: pwsh
128+
run: |
129+
echo "Create dbt login with sysadmin"
130+
sqlcmd -Q "CREATE LOGIN dbt WITH PASSWORD = '123', CHECK_POLICY = OFF, CHECK_EXPIRATION = OFF" -d "dbt_artifact_integrationtests"
131+
sqlcmd -Q "ALTER SERVER ROLE sysadmin ADD MEMBER dbt" -d "dbt_artifact_integrationtests"
132+
- name: Install tox
133+
run: python3 -m pip install tox
134+
135+
- name: Install Microsoft ODBC
136+
run: sudo ACCEPT_EULA=Y apt-get install msodbcsql18 -y
137+
138+
- name: Checkout
139+
uses: actions/checkout@v3
140+
with:
141+
ref: ${{ github.event.pull_request.head.sha }} # Check out the code of the PR
142+
143+
- name: Run Tests on PR
144+
env:
145+
DBT_VERSION: ${{ matrix.version }}
146+
run: tox -e integration_sqlserver_${{ matrix.version }}

integration_test_project/profiles.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ dbt_artifacts:
6161
schema: dbo
6262
windows_login: False
6363
trust_cert: True
64-
user: sa
64+
Encrypt: False
65+
user: dbt
6566
password: "123"
6667
redshift:
6768
type: redshift

tox.ini

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -375,31 +375,39 @@ commands =
375375

376376
[testenv:integration_sqlserver]
377377
changedir = integration_test_project
378-
deps = dbt-sqlserver~=1.8.4
378+
deps = dbt-sqlserver~=1.8.0
379379
commands =
380380
dbt clean
381381
dbt deps
382382
dbt build --target sqlserver
383383

384-
[testenv:integration_sqlserver_1_4_3]
384+
[testenv:integration_sqlserver_1_3_0]
385385
changedir = integration_test_project
386-
deps = dbt-sqlserver~=1.4.3
386+
deps = dbt-sqlserver~=1.3.0
387387
commands =
388388
dbt clean
389389
dbt deps
390390
dbt build --target sqlserver
391391

392-
[testenv:integration_sqlserver_1_7_4]
392+
[testenv:integration_sqlserver_1_4_0]
393393
changedir = integration_test_project
394-
deps = dbt-sqlserver~=1.7.4
394+
deps = dbt-sqlserver~=1.4.0
395395
commands =
396396
dbt clean
397397
dbt deps
398398
dbt build --target sqlserver
399399

400-
[testenv:integration_sqlserver_1_8_4]
400+
[testenv:integration_sqlserver_1_7_0]
401401
changedir = integration_test_project
402-
deps = dbt-sqlserver~=1.8.4
402+
deps = dbt-sqlserver~=1.7.0
403+
commands =
404+
dbt clean
405+
dbt deps
406+
dbt build --target sqlserver
407+
408+
[testenv:integration_sqlserver_1_8_0]
409+
changedir = integration_test_project
410+
deps = dbt-sqlserver~=1.8.0
403411
commands =
404412
dbt clean
405413
dbt deps

0 commit comments

Comments
 (0)