Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/build_and_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
os: [ ubuntu-24.04, windows-2022, macos-13, macos-latest ]

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0

Expand All @@ -27,7 +27,7 @@ jobs:
env:
CIBW_SKIP: pp*

- uses: actions/upload-artifact@v6
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: pytsql-wheel-${{ matrix.os }}
path: ./wheelhouse/*.whl
Expand All @@ -37,14 +37,14 @@ jobs:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0

- name: Build sdist
run: pipx run build --sdist

- uses: actions/upload-artifact@v6
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: pytsql-sdist
path: dist/*.tar.gz
Expand All @@ -60,10 +60,10 @@ jobs:
contents: write
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v7.0.0
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
pattern: pytsql-*
merge-multiple: true
path: dist

- uses: pypa/gh-action-pypi-publish@v1.13.0
- uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
198 changes: 99 additions & 99 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,99 +1,99 @@
name: CI
on: [push]
jobs:
pre-commit-checks:
name: "Pre-commit checks"
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v6
- name: Set up pixi
uses: prefix-dev/setup-pixi@v0.9.3
with:
environments: default lint
- name: pre-commit
run: pixi run pre-commit-run --color=always --show-diff-on-failure
unit-tests:
name: "Unit tests"
runs-on: ${{ matrix.os }}
env:
CI: True
strategy:
fail-fast: true
matrix:
env:
- py39
- py310
- py311
- py312
- py313
- antlr410
- antlr411
- antlr412
- antlr413
os: ['ubuntu-latest', 'windows-latest', 'macos-latest']
steps:
- name: Checkout branch
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up pixi
uses: prefix-dev/setup-pixi@v0.9.3
with:
environments: ${{ matrix.env }}
- name: Run unit tests
run: |
pixi run -e ${{ matrix.env }} postinstall
pixi run -e ${{ matrix.env }} pytest tests/unit
linux-integration_tests-sqlserver:
name: "Integration tests"
runs-on: ubuntu-latest
env:
CI: True
strategy:
fail-fast: false
matrix:
env:
- py39
- py310
- py311
- py312
- py313
- antlr410
- antlr411
- antlr412
- antlr413
- sa1
- sa2
services:
DB:
image: mcr.microsoft.com/mssql/server:2019-latest
env:
ACCEPT_EULA: Y
SA_PASSWORD: pytsql-Test-123
ports:
- 1433:1433
steps:
- name: Checkout branch
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up pixi
uses: prefix-dev/setup-pixi@v0.9.3
with:
environments: ${{ matrix.env }}
- name: Install msodbcsql17 driver
run: |
wget https://packages.microsoft.com/ubuntu/20.04/prod/pool/main/m/msodbcsql17/msodbcsql17_17.10.1.1-1_amd64.deb
ACCEPT_EULA=Y sudo apt install ./msodbcsql17_17.10.1.1-1_amd64.deb --allow-downgrades
- name: Wait for SQL Server
timeout-minutes: 1
run: until docker logs "${{ job.services.db.id }}" 2>&1 | grep -q "SQL Server is now ready"; do sleep 10; done
- name: Run integration tests
run: |
pixi run -e ${{ matrix.env }} postinstall
pixi run -e ${{ matrix.env }} pytest --backend=mssql tests/integration
name: CI
on: [push]

jobs:

pre-commit-checks:
name: "Pre-commit checks"
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up pixi
uses: prefix-dev/setup-pixi@82d477f15f3a381dbcc8adc1206ce643fe110fb7 # v0.9.3
with:
environments: default lint
- name: pre-commit
run: pixi run pre-commit-run --color=always --show-diff-on-failure

unit-tests:
name: "Unit tests"
runs-on: ${{ matrix.os }}
env:
CI: True
strategy:
fail-fast: true
matrix:
env:
- py39
- py310
- py311
- py312
- py313
- antlr410
- antlr411
- antlr412
- antlr413
os: ['ubuntu-latest', 'windows-latest', 'macos-latest']
steps:
- name: Checkout branch
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Set up pixi
uses: prefix-dev/setup-pixi@82d477f15f3a381dbcc8adc1206ce643fe110fb7 # v0.9.3
with:
environments: ${{ matrix.env }}
- name: Run unit tests
run: |
pixi run -e ${{ matrix.env }} postinstall
pixi run -e ${{ matrix.env }} pytest tests/unit

linux-integration_tests-sqlserver:
name: "Integration tests"
runs-on: ubuntu-latest
env:
CI: True
strategy:
fail-fast: false
matrix:
env:
- py39
- py310
- py311
- py312
- py313
- antlr410
- antlr411
- antlr412
- antlr413
- sa1
- sa2
services:
DB:
image: mcr.microsoft.com/mssql/server:2019-latest
env:
ACCEPT_EULA: Y
SA_PASSWORD: pytsql-Test-123
ports:
- 1433:1433
steps:
- name: Checkout branch
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Set up pixi
uses: prefix-dev/setup-pixi@82d477f15f3a381dbcc8adc1206ce643fe110fb7 # v0.9.3
with:
environments: ${{ matrix.env }}
- name: Install msodbcsql17 driver
run: |
wget https://packages.microsoft.com/ubuntu/20.04/prod/pool/main/m/msodbcsql17/msodbcsql17_17.10.1.1-1_amd64.deb
ACCEPT_EULA=Y sudo apt install ./msodbcsql17_17.10.1.1-1_amd64.deb --allow-downgrades
- name: Wait for SQL Server
timeout-minutes: 1
run: until docker logs "${{ job.services.db.id }}" 2>&1 | grep -q "SQL Server is now ready"; do sleep 10; done
- name: Run integration tests
run: |
pixi run -e ${{ matrix.env }} postinstall
pixi run -e ${{ matrix.env }} pytest --backend=mssql tests/integration
6 changes: 3 additions & 3 deletions .github/workflows/update_grammar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Set up pixi
uses: prefix-dev/setup-pixi@v0.9.3
uses: prefix-dev/setup-pixi@82d477f15f3a381dbcc8adc1206ce643fe110fb7 # v0.9.3
with:
environments: grammar
- name: Download ANTLR
Expand All @@ -27,7 +27,7 @@ jobs:
run:
pixi run -e grammar pip install .
- name: Create Pull Request
uses: peter-evans/create-pull-request@v8
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
with:
delete-branch: true
title: "Autoupdate grammar targets based on antlr/grammars-v4's TSQL grammar definition"
Expand Down
Loading