Skip to content

Commit ddcab64

Browse files
authored
Merge branch 'master' into fix-deadlocks
2 parents c1b9956 + 73537af commit ddcab64

File tree

83 files changed

+2355
-828
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+2355
-828
lines changed

.circleci/Dockerfile

Lines changed: 0 additions & 30 deletions
This file was deleted.

.circleci/config.yml

Lines changed: 0 additions & 146 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
version: 2
3+
updates:
4+
- package-ecosystem: pip
5+
directory: "/"
6+
schedule:
7+
interval: daily
8+
- package-ecosystem: github-actions
9+
directory: "/"
10+
schedule:
11+
interval: daily
12+
- package-ecosystem: docker
13+
directory: "/"
14+
schedule:
15+
interval: daily
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
name: Integration tests on Azure
3+
on: # yamllint disable-line rule:truthy
4+
push:
5+
branches:
6+
- master
7+
- v*
8+
- azure-testing
9+
pull_request_target:
10+
types: [labeled]
11+
12+
jobs:
13+
integration-tests-azure:
14+
name: Integration tests on Azure
15+
if: contains(github.event.pull_request.labels.*.name, 'safe to test') || github.ref_name == 'master' || github.ref_name == 'azure-testing'
16+
strategy:
17+
matrix:
18+
python_version: ["3.7", "3.8", "3.9", "3.10"]
19+
profile: ["ci_azure_cli", "ci_azure_auto", "ci_azure_environment", "ci_azure_basic"]
20+
msodbc_version: ["17", "18"]
21+
max-parallel: 1
22+
runs-on: ubuntu-latest
23+
container:
24+
image: ghcr.io/${{ github.repository }}:CI-${{ matrix.python_version }}-msodbc${{ matrix.msodbc_version }}
25+
steps:
26+
- name: AZ CLI login
27+
run: az login --service-principal --username="${AZURE_CLIENT_ID}" --password="${AZURE_CLIENT_SECRET}" --tenant="${AZURE_TENANT_ID}"
28+
env:
29+
AZURE_CLIENT_ID: ${{ secrets.DBT_AZURE_SP_NAME }}
30+
AZURE_CLIENT_SECRET: ${{ secrets.DBT_AZURE_SP_SECRET }}
31+
AZURE_TENANT_ID: ${{ secrets.DBT_AZURE_TENANT }}
32+
33+
- uses: actions/checkout@v3
34+
35+
- name: Install dependencies
36+
run: pip install -r dev_requirements.txt
37+
38+
- name: Wake up server
39+
env:
40+
DBT_AZURESQL_SERVER: ${{ secrets.DBT_AZURESQL_SERVER }}
41+
DBT_AZURESQL_DB: ${{ secrets.DBT_AZURESQL_DB }}
42+
DBT_AZURESQL_UID: ${{ secrets.DBT_AZURESQL_UID }}
43+
DBT_AZURESQL_PWD: ${{ secrets.DBT_AZURESQL_PWD }}
44+
MSODBC_VERSION: ${{ matrix.msodbc_version }}
45+
run: python devops/scripts/wakeup_azure.py
46+
47+
- name: Configure test users
48+
run: sqlcmd -b -I -i devops/scripts/init.sql
49+
env:
50+
DBT_TEST_USER_1: DBT_TEST_USER_1
51+
DBT_TEST_USER_2: DBT_TEST_USER_2
52+
DBT_TEST_USER_3: DBT_TEST_USER_3
53+
SQLCMDUSER: ${{ secrets.DBT_AZURESQL_UID }}
54+
SQLCMDPASSWORD: ${{ secrets.DBT_AZURESQL_PWD }}
55+
SQLCMDSERVER: ${{ secrets.DBT_AZURESQL_SERVER }}
56+
SQLCMDDBNAME: ${{ secrets.DBT_AZURESQL_DB }}
57+
58+
- name: Run functional tests
59+
env:
60+
DBT_AZURESQL_SERVER: ${{ secrets.DBT_AZURESQL_SERVER }}
61+
DBT_AZURESQL_DB: ${{ secrets.DBT_AZURESQL_DB }}
62+
DBT_AZURESQL_UID: ${{ secrets.DBT_AZURESQL_UID }}
63+
DBT_AZURESQL_PWD: ${{ secrets.DBT_AZURESQL_PWD }}
64+
AZURE_CLIENT_ID: ${{ secrets.DBT_AZURE_SP_NAME }}
65+
AZURE_CLIENT_SECRET: ${{ secrets.DBT_AZURE_SP_SECRET }}
66+
AZURE_TENANT_ID: ${{ secrets.DBT_AZURE_TENANT }}
67+
DBT_TEST_USER_1: DBT_TEST_USER_1
68+
DBT_TEST_USER_2: DBT_TEST_USER_2
69+
DBT_TEST_USER_3: DBT_TEST_USER_3
70+
DBT_TEST_AAD_PRINCIPAL_1: ${{ secrets.DBT_TEST_AAD_PRINCIPAL_1 }}
71+
DBT_TEST_AAD_PRINCIPAL_2: ${{ secrets.DBT_TEST_AAD_PRINCIPAL_2 }}
72+
SQLSERVER_TEST_DRIVER: 'ODBC Driver ${{ matrix.msodbc_version }} for SQL Server'
73+
run: pytest -ra -v tests/functional --profile "${{ matrix.profile }}"
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
name: Integration tests on SQL Server
3+
on: # yamllint disable-line rule:truthy
4+
push:
5+
branches:
6+
- master
7+
- v*
8+
pull_request:
9+
branches:
10+
- master
11+
- v*
12+
13+
jobs:
14+
integration-tests-sql-server:
15+
name: Integration tests on SQL Server
16+
strategy:
17+
matrix:
18+
python_version: ["3.7", "3.8", "3.9", "3.10"]
19+
msodbc_version: ["17", "18"]
20+
sqlserver_version: ["2017", "2019", "2022"]
21+
runs-on: ubuntu-latest
22+
container:
23+
image: ghcr.io/${{ github.repository }}:CI-${{ matrix.python_version }}-msodbc${{ matrix.msodbc_version }}
24+
services:
25+
sqlserver:
26+
image: ghcr.io/${{ github.repository }}:server-${{ matrix.sqlserver_version }}
27+
env:
28+
ACCEPT_EULA: 'Y'
29+
SA_PASSWORD: 5atyaNadella
30+
DBT_TEST_USER_1: DBT_TEST_USER_1
31+
DBT_TEST_USER_2: DBT_TEST_USER_2
32+
DBT_TEST_USER_3: DBT_TEST_USER_3
33+
steps:
34+
- uses: actions/checkout@v3
35+
36+
- name: Install dependencies
37+
run: pip install -r dev_requirements.txt
38+
39+
- name: Run functional tests
40+
run: pytest -ra -v tests/functional --profile "ci_sql_server"
41+
env:
42+
DBT_TEST_USER_1: DBT_TEST_USER_1
43+
DBT_TEST_USER_2: DBT_TEST_USER_2
44+
DBT_TEST_USER_3: DBT_TEST_USER_3
45+
SQLSERVER_TEST_DRIVER: 'ODBC Driver ${{ matrix.msodbc_version }} for SQL Server'

.github/workflows/publish-docker.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
name: Publish Docker images for CI/CD
3+
on: # yamllint disable-line rule:truthy
4+
push:
5+
paths:
6+
- 'devops/**'
7+
- '.github/workflows/publish-docker.yml'
8+
branches:
9+
- 'master'
10+
11+
jobs:
12+
publish-docker-client:
13+
strategy:
14+
matrix:
15+
python_version: ["3.7", "3.8", "3.9", "3.10"]
16+
docker_target: ["msodbc17", "msodbc18"]
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
20+
packages: write
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v3
24+
25+
- name: Log in to the Container registry
26+
uses: docker/[email protected]
27+
with:
28+
registry: ghcr.io
29+
username: ${{ github.actor }}
30+
password: ${{ secrets.GITHUB_TOKEN }}
31+
32+
- name: Build and push Docker image
33+
uses: docker/[email protected]
34+
with:
35+
context: devops
36+
build-args: PYTHON_VERSION=${{ matrix.python_version }}
37+
file: devops/CI.Dockerfile
38+
push: true
39+
platforms: linux/amd64
40+
target: ${{ matrix.docker_target }}
41+
tags: ghcr.io/${{ github.repository }}:CI-${{ matrix.python_version }}-${{ matrix.docker_target }}
42+
43+
publish-docker-server:
44+
strategy:
45+
matrix:
46+
mssql_version: ["2017", "2019", "2022"]
47+
runs-on: ubuntu-latest
48+
permissions:
49+
contents: read
50+
packages: write
51+
steps:
52+
- name: Checkout
53+
uses: actions/checkout@v3
54+
55+
- name: Log in to the Container registry
56+
uses: docker/[email protected]
57+
with:
58+
registry: ghcr.io
59+
username: ${{ github.actor }}
60+
password: ${{ secrets.GITHUB_TOKEN }}
61+
62+
- name: Build and push Docker image
63+
uses: docker/[email protected]
64+
with:
65+
context: devops
66+
build-args: MSSQL_VERSION=${{ matrix.mssql_version }}
67+
file: devops/server.Dockerfile
68+
push: true
69+
platforms: linux/amd64
70+
tags: ghcr.io/${{ github.repository }}:server-${{ matrix.mssql_version }}

0 commit comments

Comments
 (0)