Skip to content

Commit

Permalink
Added CI for SQL Server
Browse files Browse the repository at this point in the history
  • Loading branch information
bvkabn committed Sep 18, 2024
1 parent 2567972 commit 479ba59
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/ci_test_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ jobs:
strategy:
fail-fast: false # Don't fail one DWH if the others fail
matrix:
warehouse: ["snowflake", "bigquery", "postgres"]
warehouse: ["snowflake", "bigquery", "postgres", "sqlserver"]
# When supporting a new version, update the list here
version: ["1_3_0", "1_4_0", "1_5_0", "1_6_0", "1_7_0", "1_8_0"]
runs-on: ubuntu-latest
Expand Down Expand Up @@ -145,6 +145,12 @@ jobs:
- name: Install tox
run: python3 -m pip install tox

- name: Install SQL Server
run: docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=123" -p 1433:1433 -d mcr.microsoft.com/mssql/server:2022-latest

- name: Install Microsoft ODBC
run: sudo ACCEPT_EULA=Y apt-get install msodbcsql18 -y

- name: Checkout
uses: actions/checkout@v3
with:
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/main_test_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
integration:
strategy:
matrix:
warehouse: ["snowflake", "bigquery", "postgres"]
warehouse: ["snowflake", "bigquery", "postgres", "sqlserver"]
version: ["1_3_0", "1_4_0", "1_5_0", "1_6_0", "1_7_0", "1_8_0"]
runs-on: ubuntu-latest
permissions:
Expand Down Expand Up @@ -66,6 +66,12 @@ jobs:
- name: Install tox
run: python3 -m pip install tox

- name: Install SQL Server
run: docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=123" -p 1433:1433 -d mcr.microsoft.com/mssql/server:2022-latest

- name: Install Microsoft ODBC
run: sudo ACCEPT_EULA=Y apt-get install msodbcsql18 -y

- id: auth
if: ${{ matrix.warehouse == 'bigquery' }}
uses: google-github-actions/auth@v1
Expand Down
2 changes: 1 addition & 1 deletion integration_test_project/profiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@ dbt_artifacts:
schema: dbo
windows_login: False
trust_cert: True
user: dbt
user: sa
password: "123"
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ skipsdist = True
envlist = lint_all

[sqlfluff]
dialect = snowflake
dialect = tsql
templater = dbt
rules = LT01,LT03,CP01,AL01,AL02,CP02,ST08,LT06,LT07,AM01,LT08,AL05,RF02,RF03,CP03,ST01,LT09,AM03,CP04,LT10,ST05,ST03,JJ01,AM05,CV08

Expand Down Expand Up @@ -35,7 +35,7 @@ rules = LT01,LT03,CP01,AL01,AL02,CP02,ST08,LT06,LT07,AM01,LT08,AL05,RF02,RF03,CP

deps =
sqlfluff-templater-dbt~=2.0.2
dbt-snowflake~=1.8.0
dbt-sqlserver~=1.8.4

[sqlfluff:indentation]
indent_unit = space
Expand Down

0 comments on commit 479ba59

Please sign in to comment.