@@ -2,16 +2,17 @@ name: Code Quality Checks
22on :
33 push :
44 branches :
5- - main
5+ - PECO-1803/connector-split
66 pull_request :
77 branches :
8- - main
8+ - PECO-1803/connector-split
99jobs :
1010 run-unit-tests :
1111 runs-on : ubuntu-latest
1212 strategy :
1313 matrix :
1414 python-version : [3.8, 3.9, "3.10", "3.11"]
15+ package : ["databricks_sql_connector_core", "databricks_sql_connector"]
1516 steps :
1617 # ----------------------------------------------
1718 # check-out repo and set-up python
@@ -48,21 +49,26 @@ jobs:
4849 - name : Install dependencies
4950 if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
5051 run : poetry install --no-interaction --no-root
52+ working-directory : ${{ github.workspace }}/${{ matrix.package }}
5153 # ----------------------------------------------
5254 # install your root project, if required
5355 # ----------------------------------------------
5456 - name : Install library
5557 run : poetry install --no-interaction
58+ working-directory : ${{ github.workspace }}/${{ matrix.package }}
5659 # ----------------------------------------------
5760 # run test suite
5861 # ----------------------------------------------
5962 - name : Run tests
63+ if : maxtrix.package != "databricks_sql_connector"
6064 run : poetry run python -m pytest tests/unit
65+ working-directory : ${{ github.workspace }}/${{ matrix.package }}
6166 check-linting :
6267 runs-on : ubuntu-latest
6368 strategy :
6469 matrix :
6570 python-version : [3.8, 3.9, "3.10"]
71+ package : ["databricks_sql_connector_core"]
6672 steps :
6773 # ----------------------------------------------
6874 # check-out repo and set-up python
@@ -99,22 +105,26 @@ jobs:
99105 - name : Install dependencies
100106 if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
101107 run : poetry install --no-interaction --no-root
108+ working-directory : ${{ github.workspace }}/${{ matrix.package }}
102109 # ----------------------------------------------
103110 # install your root project, if required
104111 # ----------------------------------------------
105112 - name : Install library
106113 run : poetry install --no-interaction
114+ working-directory : ${{ github.workspace }}/${{ matrix.package }}
107115 # ----------------------------------------------
108116 # black the code
109117 # ----------------------------------------------
110118 - name : Black
111119 run : poetry run black --check src
120+ working-directory : ${{ github.workspace }}/${{ matrix.package }}
112121
113122 check-types :
114123 runs-on : ubuntu-latest
115124 strategy :
116125 matrix :
117126 python-version : [3.8, 3.9, "3.10"]
127+ package : ["databricks_sql_connector_core"]
118128 steps :
119129 # ----------------------------------------------
120130 # check-out repo and set-up python
@@ -151,15 +161,19 @@ jobs:
151161 - name : Install dependencies
152162 if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
153163 run : poetry install --no-interaction --no-root
164+ working-directory : ${{ github.workspace }}/${{ matrix.package }}
154165 # ----------------------------------------------
155166 # install your root project, if required
156167 # ----------------------------------------------
157168 - name : Install library
158169 run : poetry install --no-interaction
170+ working-directory : ${{ github.workspace }}/${{ matrix.package }}
159171 # ----------------------------------------------
160172 # mypy the code
161173 # ----------------------------------------------
162174 - name : Mypy
163175 run : |
164176 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
165177 poetry run mypy --install-types --non-interactive src
178+ working-directory: ${{ github.workspace }}/${{ matrix.package }}
179+
0 commit comments