5656 python-version : " 3.13"
5757 - hatch-env : sa14
5858 python-version : " 3.12"
59+ - hatch-env : sa21
60+ python-version : " 3.12"
5961 steps :
6062 - uses : actions/checkout@v4
6163 with :
7375 python -m hatch -e ${{ matrix.hatch-env }} build --clean
7476 - name : Install and check import
7577 run : |
76- python -m uv pip install dist/snowflake_sqlalchemy-*.whl
77- python -c "import snowflake.sqlalchemy; print(snowflake.sqlalchemy.__version__)"
78+ hatch run ${{ matrix.hatch-env }}: pip install dist/snowflake_sqlalchemy-*.whl --force-reinstall --no-deps
79+ hatch run ${{ matrix.hatch-env }}:check-import
7880
7981 test-dialect :
8082 name : Test dialect ${{ matrix.os }}-${{ fromJson('{"default":"3.13","sa14":"3.12"}')[matrix.hatch-env] }}-${{ matrix.cloud-provider }}-${{ matrix.hatch-env }}
@@ -261,6 +263,97 @@ jobs:
261263 path : |
262264 ./coverage.xml
263265
266+ test-dialect-v21 :
267+ name : Test dialect sa21 ${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.cloud-provider }}
268+ needs : [lint, build-install]
269+ runs-on : ${{ matrix.os }}
270+ strategy :
271+ fail-fast : false
272+ matrix :
273+ os : [ubuntu-latest, macos-15, windows-latest]
274+ python-version : ["3.12"]
275+ cloud-provider : [aws, azure, gcp]
276+ steps :
277+ - uses : actions/checkout@v4
278+ with :
279+ persist-credentials : false
280+ - name : Set up Python
281+ uses : actions/setup-python@v5
282+ with :
283+ python-version : ${{ matrix.python-version }}
284+ - name : Setup parameters file
285+ shell : bash
286+ env :
287+ PARAMETERS_SECRET : ${{ secrets.PARAMETERS_SECRET }}
288+ run : |
289+ printf "%s" "$PARAMETERS_SECRET" | gpg --quiet --batch --yes \
290+ --decrypt \
291+ --passphrase-fd 0 \
292+ --pinentry-mode loopback \
293+ --output tests/parameters.py \
294+ .github/workflows/parameters/parameters_${{ matrix.cloud-provider }}.py.gpg
295+ - name : Upgrade pip and install hatch
296+ run : |
297+ python -m pip install -U uv
298+ python -m uv pip install -U hatch
299+ python -m hatch env create sa21
300+ - name : Verify SQLAlchemy version
301+ run : hatch run sa21:python -c "import sqlalchemy; print(sqlalchemy.__version__); assert sqlalchemy.__version__.startswith('2.1'), f'Expected SQLAlchemy 2.1.x, got {{sqlalchemy.__version__}}'"
302+ - name : Run test for AWS
303+ run : hatch run sa21:test-dialect-aws
304+ if : matrix.cloud-provider == 'aws'
305+ - name : Run tests
306+ run : hatch run sa21:test-dialect
307+ - uses : actions/upload-artifact@v4
308+ with :
309+ name : coverage.xml_dialect-sa21-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.cloud-provider }}
310+ path : |
311+ ./coverage.xml
312+
313+ test-dialect-compatibility-v21 :
314+ name : Test dialect sa21 compatibility ${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.cloud-provider }}
315+ needs : lint
316+ runs-on : ${{ matrix.os }}
317+ strategy :
318+ fail-fast : false
319+ matrix :
320+ os : [ubuntu-latest, macos-15, windows-latest]
321+ python-version : ["3.12"]
322+ cloud-provider : [aws, azure, gcp]
323+ steps :
324+ - uses : actions/checkout@v4
325+ with :
326+ persist-credentials : false
327+ - name : Set up Python
328+ uses : actions/setup-python@v5
329+ with :
330+ python-version : ${{ matrix.python-version }}
331+ - name : Upgrade pip and install hatch
332+ run : |
333+ python -m pip install -U uv
334+ python -m uv pip install -U hatch
335+ python -m hatch env create sa21
336+ - name : Verify SQLAlchemy version
337+ run : hatch run sa21:python -c "import sqlalchemy; print(sqlalchemy.__version__); assert sqlalchemy.__version__.startswith('2.1'), f'Expected SQLAlchemy 2.1.x, got {{sqlalchemy.__version__}}'"
338+ - name : Setup parameters file
339+ shell : bash
340+ env :
341+ PARAMETERS_SECRET : ${{ secrets.PARAMETERS_SECRET }}
342+ run : |
343+ printf "%s" "$PARAMETERS_SECRET" | gpg --quiet --batch --yes \
344+ --decrypt \
345+ --passphrase-fd 0 \
346+ --pinentry-mode loopback \
347+ --output tests/parameters.py \
348+ .github/workflows/parameters/parameters_${{ matrix.cloud-provider }}.py.gpg
349+ - name : Run tests
350+ run : hatch run sa21:test-dialect-compatibility
351+ - uses : actions/upload-artifact@v4
352+ with :
353+ name : coverage.xml_dialect-sa21-compatibility-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.cloud-provider }}
354+ path : |
355+ ./coverage.xml
356+
264357 combine-coverage :
265358 name : Combine coverage
266359 if : ${{ success() || failure() }}
@@ -270,6 +363,8 @@ jobs:
270363 test-dialect-compatibility,
271364 test-dialect-v14,
272365 test-dialect-compatibility-v14,
366+ test-dialect-v21,
367+ test-dialect-compatibility-v21,
273368 ]
274369 runs-on : ubuntu-latest
275370 steps :
0 commit comments