|  | 
| 7 | 7 |     branches: | 
| 8 | 8 |       - PECO-1803/connector-split | 
| 9 | 9 | jobs: | 
| 10 |  | -  run-unit-tests: | 
|  | 10 | +  validate-connector-core: | 
| 11 | 11 |     runs-on: ubuntu-latest | 
| 12 |  | -    strategy: | 
| 13 |  | -      matrix: | 
| 14 |  | -        python-version: [3.8, 3.9, "3.10", "3.11"] | 
| 15 |  | -        package: ["databricks_sql_connector_core", "databricks_sql_connector"] | 
| 16 | 12 |     steps: | 
| 17 |  | -      #---------------------------------------------- | 
| 18 |  | -      #       check-out repo and set-up python | 
| 19 |  | -      #---------------------------------------------- | 
| 20 |  | -      - name: Check out repository | 
| 21 |  | -        uses: actions/checkout@v2 | 
| 22 |  | -      - name: Set up python ${{ matrix.python-version }} | 
| 23 |  | -        id: setup-python | 
| 24 |  | -        uses: actions/setup-python@v2 | 
|  | 13 | +      - name: Build | 
|  | 14 | +        uses: ./.github/workflows/build.yml | 
| 25 | 15 |         with: | 
| 26 |  | -          python-version: ${{ matrix.python-version }} | 
| 27 |  | -      #---------------------------------------------- | 
| 28 |  | -      #  -----  install & configure poetry  ----- | 
| 29 |  | -      #---------------------------------------------- | 
| 30 |  | -      - name: Install Poetry | 
| 31 |  | -        uses: snok/install-poetry@v1 | 
| 32 |  | -        with: | 
| 33 |  | -          virtualenvs-create: true | 
| 34 |  | -          virtualenvs-in-project: true | 
| 35 |  | -          installer-parallel: true | 
| 36 |  | - | 
| 37 |  | -      #---------------------------------------------- | 
| 38 |  | -      #       load cached venv if cache exists | 
| 39 |  | -      #---------------------------------------------- | 
| 40 |  | -      - name: Load cached venv | 
| 41 |  | -        id: cached-poetry-dependencies | 
| 42 |  | -        uses: actions/cache@v2 | 
| 43 |  | -        with: | 
| 44 |  | -          path: .venv | 
| 45 |  | -          key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ github.event.repository.name }}-${{ hashFiles('**/poetry.lock') }} | 
| 46 |  | -      #---------------------------------------------- | 
| 47 |  | -      # install dependencies if cache does not exist | 
| 48 |  | -      #---------------------------------------------- | 
| 49 |  | -      - name: Install dependencies | 
| 50 |  | -        if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | 
| 51 |  | -        run: poetry install --no-interaction --no-root | 
| 52 |  | -        working-directory: ${{ github.workspace }}/${{ matrix.package }} | 
| 53 |  | -      #---------------------------------------------- | 
| 54 |  | -      # install your root project, if required | 
| 55 |  | -      #---------------------------------------------- | 
| 56 |  | -      - name: Install library | 
| 57 |  | -        run: poetry install --no-interaction | 
| 58 |  | -        working-directory: ${{ github.workspace }}/${{ matrix.package }} | 
| 59 |  | -      #---------------------------------------------- | 
| 60 |  | -      #              run test suite | 
| 61 |  | -      #---------------------------------------------- | 
| 62 |  | -      - name: Run tests | 
| 63 |  | -        if: ${{ maxtrix.package != 'databricks_sql_connector'}} | 
| 64 |  | -        run: poetry run python -m pytest tests/unit | 
| 65 |  | -        working-directory: ${{ github.workspace }}/${{ matrix.package }} | 
| 66 |  | -  check-linting: | 
| 67 |  | -    runs-on: ubuntu-latest | 
| 68 |  | -    strategy: | 
| 69 |  | -      matrix: | 
| 70 |  | -        python-version: [3.8, 3.9, "3.10"] | 
| 71 |  | -        package: ["databricks_sql_connector_core"] | 
| 72 |  | -    steps: | 
| 73 |  | -      #---------------------------------------------- | 
| 74 |  | -      #       check-out repo and set-up python | 
| 75 |  | -      #---------------------------------------------- | 
| 76 |  | -      - name: Check out repository | 
| 77 |  | -        uses: actions/checkout@v2 | 
| 78 |  | -      - name: Set up python ${{ matrix.python-version }} | 
| 79 |  | -        id: setup-python | 
| 80 |  | -        uses: actions/setup-python@v2 | 
| 81 |  | -        with: | 
| 82 |  | -          python-version: ${{ matrix.python-version }} | 
| 83 |  | -      #---------------------------------------------- | 
| 84 |  | -      #  -----  install & configure poetry  ----- | 
| 85 |  | -      #---------------------------------------------- | 
| 86 |  | -      - name: Install Poetry | 
| 87 |  | -        uses: snok/install-poetry@v1 | 
| 88 |  | -        with: | 
| 89 |  | -          virtualenvs-create: true | 
| 90 |  | -          virtualenvs-in-project: true | 
| 91 |  | -          installer-parallel: true | 
| 92 |  | - | 
| 93 |  | -      #---------------------------------------------- | 
| 94 |  | -      #       load cached venv if cache exists | 
| 95 |  | -      #---------------------------------------------- | 
| 96 |  | -      - name: Load cached venv | 
| 97 |  | -        id: cached-poetry-dependencies | 
| 98 |  | -        uses: actions/cache@v2 | 
| 99 |  | -        with: | 
| 100 |  | -          path: .venv | 
| 101 |  | -          key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ github.event.repository.name }}-${{ hashFiles('**/poetry.lock') }} | 
| 102 |  | -      #---------------------------------------------- | 
| 103 |  | -      # install dependencies if cache does not exist | 
| 104 |  | -      #---------------------------------------------- | 
| 105 |  | -      - name: Install dependencies | 
| 106 |  | -        if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | 
| 107 |  | -        run: poetry install --no-interaction --no-root | 
| 108 |  | -        working-directory: ${{ github.workspace }}/${{ matrix.package }} | 
| 109 |  | -      #---------------------------------------------- | 
| 110 |  | -      # install your root project, if required | 
| 111 |  | -      #---------------------------------------------- | 
| 112 |  | -      - name: Install library | 
| 113 |  | -        run: poetry install --no-interaction | 
| 114 |  | -        working-directory: ${{ github.workspace }}/${{ matrix.package }} | 
| 115 |  | -      #---------------------------------------------- | 
| 116 |  | -      #              black the code | 
| 117 |  | -      #---------------------------------------------- | 
| 118 |  | -      - name: Black | 
| 119 |  | -        run: poetry run black --check src | 
| 120 |  | -        working-directory: ${{ github.workspace }}/${{ matrix.package }} | 
| 121 |  | - | 
| 122 |  | -  check-types: | 
| 123 |  | -    runs-on: ubuntu-latest | 
| 124 |  | -    strategy: | 
| 125 |  | -      matrix: | 
| 126 |  | -        python-version: [3.8, 3.9, "3.10"] | 
| 127 |  | -        package: ["databricks_sql_connector_core"] | 
| 128 |  | -    steps: | 
| 129 |  | -      #---------------------------------------------- | 
| 130 |  | -      #       check-out repo and set-up python | 
| 131 |  | -      #---------------------------------------------- | 
| 132 |  | -      - name: Check out repository | 
| 133 |  | -        uses: actions/checkout@v2 | 
| 134 |  | -      - name: Set up python ${{ matrix.python-version }} | 
| 135 |  | -        id: setup-python | 
| 136 |  | -        uses: actions/setup-python@v2 | 
| 137 |  | -        with: | 
| 138 |  | -          python-version: ${{ matrix.python-version }} | 
| 139 |  | -      #---------------------------------------------- | 
| 140 |  | -      #  -----  install & configure poetry  ----- | 
| 141 |  | -      #---------------------------------------------- | 
| 142 |  | -      - name: Install Poetry | 
| 143 |  | -        uses: snok/install-poetry@v1 | 
| 144 |  | -        with: | 
| 145 |  | -          virtualenvs-create: true | 
| 146 |  | -          virtualenvs-in-project: true | 
| 147 |  | -          installer-parallel: true | 
| 148 |  | - | 
| 149 |  | -      #---------------------------------------------- | 
| 150 |  | -      #       load cached venv if cache exists | 
| 151 |  | -      #---------------------------------------------- | 
| 152 |  | -      - name: Load cached venv | 
| 153 |  | -        id: cached-poetry-dependencies | 
| 154 |  | -        uses: actions/cache@v2 | 
| 155 |  | -        with: | 
| 156 |  | -          path: .venv | 
| 157 |  | -          key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ github.event.repository.name }}-${{ hashFiles('**/poetry.lock') }} | 
| 158 |  | -      #---------------------------------------------- | 
| 159 |  | -      # install dependencies if cache does not exist | 
| 160 |  | -      #---------------------------------------------- | 
| 161 |  | -      - name: Install dependencies | 
| 162 |  | -        if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | 
| 163 |  | -        run: poetry install --no-interaction --no-root | 
| 164 |  | -        working-directory: ${{ github.workspace }}/${{ matrix.package }} | 
| 165 |  | -      #---------------------------------------------- | 
| 166 |  | -      # install your root project, if required | 
| 167 |  | -      #---------------------------------------------- | 
| 168 |  | -      - name: Install library | 
| 169 |  | -        run: poetry install --no-interaction | 
| 170 |  | -        working-directory: ${{ github.workspace }}/${{ matrix.package }} | 
| 171 |  | -      #---------------------------------------------- | 
| 172 |  | -      #              mypy the code | 
| 173 |  | -      #---------------------------------------------- | 
| 174 |  | -      - name: Mypy | 
| 175 |  | -        run: | | 
| 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 | 
| 177 |  | -          poetry run mypy --install-types --non-interactive src | 
| 178 |  | -          working-directory: ${{ github.workspace }}/${{ matrix.package }} | 
|  | 16 | +          target_path: "databricks_sql_connector_core" | 
|  | 17 | +          run_test: true | 
| 179 | 18 | 
 | 
0 commit comments