|
1 | 1 | version: 2.1 |
2 | 2 |
|
3 | 3 | orbs: |
4 | | - python: circleci/python@1.1.0 |
| 4 | + python: circleci/python@1.3 |
5 | 5 | azure-cli: circleci/azure-cli@1.1.0 |
6 | 6 |
|
7 | 7 | jobs: |
8 | | - build: |
| 8 | + unit: |
9 | 9 | docker: &msodbc_py |
10 | 10 | - image: &docker_image dbtmsft/msodbc_py:0.5 |
11 | 11 | steps: |
12 | 12 | - checkout |
13 | | - - run: |
14 | | - name: install python deps |
15 | | - command: | |
16 | | - python3 -m venv venv |
17 | | - . venv/bin/activate |
18 | | - pip install -r dev_requirements.txt |
19 | | - - persist_to_workspace: |
20 | | - root: . |
21 | | - paths: |
22 | | - - . |
23 | | - unit: |
24 | | - docker: *msodbc_py |
25 | | - steps: |
26 | | - - attach_workspace: |
27 | | - at: . |
28 | | - - run: | |
29 | | - . venv/bin/activate |
30 | | - tox -- -v test/unit |
| 13 | + - python/install-packages: |
| 14 | + pkg-manager: pip |
| 15 | + pip-dependency-file: dev_requirements.txt |
| 16 | + - run: tox -- -v test/unit |
31 | 17 | integration-sqlserver: &sqlserver |
32 | 18 | docker: &msodbc_py_&_sqlserver |
33 | 19 | - image: *docker_image |
|
37 | 23 | MSSQL_SA_PASSWORD: 5atyaNadella |
38 | 24 | MSSQL_IP_ADDRESS: 0.0.0.0 |
39 | 25 | steps: |
40 | | - - attach_workspace: |
41 | | - at: . |
| 26 | + - checkout |
| 27 | + - python/install-packages: |
| 28 | + pkg-manager: pip |
| 29 | + pip-dependency-file: dev_requirements.txt |
42 | 30 | - run: |
43 | 31 | name: wait for SQL Server container to set up |
44 | 32 | command: sleep 30 |
|
47 | 35 | command: sqlcmd -S 'localhost,1433' -U sa -P 5atyaNadella -Q 'create database blog' |
48 | 36 | - run: |
49 | 37 | name: Test adapter on SQL Server against dbt-adapter-tests |
50 | | - command: | |
51 | | - . venv/bin/activate |
52 | | - tox -- -v test/integration/sqlserver.dbtspec |
| 38 | + command: tox -- -v test/integration/sqlserver.dbtspec |
53 | 39 | connection-sqlserver: |
54 | 40 | <<: *sqlserver |
55 | 41 | steps: |
@@ -79,13 +65,13 @@ jobs: |
79 | 65 | integration-azuresql: |
80 | 66 | docker: *msodbc_py |
81 | 67 | steps: |
82 | | - - attach_workspace: |
83 | | - at: . |
| 68 | + - checkout |
| 69 | + - python/install-packages: |
| 70 | + pkg-manager: pip |
| 71 | + pip-dependency-file: dev_requirements.txt |
84 | 72 | - run: |
85 | 73 | name: Test adapter on Azure SQL against dbt-adapter-tests |
86 | | - command: | |
87 | | - . venv/bin/activate |
88 | | - tox -- -v test/integration/azuresql.dbtspec |
| 74 | + command: tox -- -v test/integration/azuresql.dbtspec |
89 | 75 | connection-azuresql: |
90 | 76 | docker: *msodbc_py |
91 | 77 | steps: |
@@ -121,16 +107,10 @@ jobs: |
121 | 107 | workflows: |
122 | 108 | main: |
123 | 109 | jobs: |
124 | | - - build |
125 | | - - unit: &build |
126 | | - requires: |
127 | | - - build |
| 110 | + - unit |
128 | 111 | - connection-azuresql: &profile |
129 | 112 | context: |
130 | 113 | - DBT_SYNAPSE_PROFILE |
131 | 114 | - connection-sqlserver: *profile |
132 | | - - integration-sqlserver: &build_and_profile |
133 | | - <<: *build |
134 | | - context: |
135 | | - - DBT_SYNAPSE_PROFILE |
136 | | - - integration-azuresql: *build_and_profile |
| 115 | + - integration-sqlserver: *profile |
| 116 | + - integration-azuresql: *profile |
0 commit comments