@@ -2,16 +2,17 @@ name: Code Quality Checks
2
2
on :
3
3
push :
4
4
branches :
5
- - main
5
+ - PECO-1803/connector-split
6
6
pull_request :
7
7
branches :
8
- - main
8
+ - PECO-1803/connector-split
9
9
jobs :
10
10
run-unit-tests :
11
11
runs-on : ubuntu-latest
12
12
strategy :
13
13
matrix :
14
14
python-version : [3.8, 3.9, "3.10", "3.11"]
15
+ package : ["databricks_sql_connector_core", "databricks_sql_connector"]
15
16
steps :
16
17
# ----------------------------------------------
17
18
# check-out repo and set-up python
@@ -48,21 +49,26 @@ jobs:
48
49
- name : Install dependencies
49
50
if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
50
51
run : poetry install --no-interaction --no-root
52
+ working-directory : ${{ github.workspace }}/${{ matrix.package }}
51
53
# ----------------------------------------------
52
54
# install your root project, if required
53
55
# ----------------------------------------------
54
56
- name : Install library
55
57
run : poetry install --no-interaction
58
+ working-directory : ${{ github.workspace }}/${{ matrix.package }}
56
59
# ----------------------------------------------
57
60
# run test suite
58
61
# ----------------------------------------------
59
62
- name : Run tests
63
+ if : maxtrix.package != "databricks_sql_connector"
60
64
run : poetry run python -m pytest tests/unit
65
+ working-directory : ${{ github.workspace }}/${{ matrix.package }}
61
66
check-linting :
62
67
runs-on : ubuntu-latest
63
68
strategy :
64
69
matrix :
65
70
python-version : [3.8, 3.9, "3.10"]
71
+ package : ["databricks_sql_connector_core"]
66
72
steps :
67
73
# ----------------------------------------------
68
74
# check-out repo and set-up python
@@ -99,22 +105,26 @@ jobs:
99
105
- name : Install dependencies
100
106
if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
101
107
run : poetry install --no-interaction --no-root
108
+ working-directory : ${{ github.workspace }}/${{ matrix.package }}
102
109
# ----------------------------------------------
103
110
# install your root project, if required
104
111
# ----------------------------------------------
105
112
- name : Install library
106
113
run : poetry install --no-interaction
114
+ working-directory : ${{ github.workspace }}/${{ matrix.package }}
107
115
# ----------------------------------------------
108
116
# black the code
109
117
# ----------------------------------------------
110
118
- name : Black
111
119
run : poetry run black --check src
120
+ working-directory : ${{ github.workspace }}/${{ matrix.package }}
112
121
113
122
check-types :
114
123
runs-on : ubuntu-latest
115
124
strategy :
116
125
matrix :
117
126
python-version : [3.8, 3.9, "3.10"]
127
+ package : ["databricks_sql_connector_core"]
118
128
steps :
119
129
# ----------------------------------------------
120
130
# check-out repo and set-up python
@@ -151,15 +161,19 @@ jobs:
151
161
- name : Install dependencies
152
162
if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
153
163
run : poetry install --no-interaction --no-root
164
+ working-directory : ${{ github.workspace }}/${{ matrix.package }}
154
165
# ----------------------------------------------
155
166
# install your root project, if required
156
167
# ----------------------------------------------
157
168
- name : Install library
158
169
run : poetry install --no-interaction
170
+ working-directory : ${{ github.workspace }}/${{ matrix.package }}
159
171
# ----------------------------------------------
160
172
# mypy the code
161
173
# ----------------------------------------------
162
174
- name : Mypy
163
175
run : |
164
176
mkdir .mypy_cache # Workaround for bad error message "error: --install-types failed (no mypy cache directory)"; see https://github.com/python/mypy/issues/10768#issuecomment-2178450153
165
177
poetry run mypy --install-types --non-interactive src
178
+ working-directory: ${{ github.workspace }}/${{ matrix.package }}
179
+
0 commit comments