Handle __del__
of connection object more gracefully #390
#68
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI-CD | |
on: | |
push: | |
branches: | |
- 'master' | |
tags: | |
- '**' | |
jobs: | |
docs: | |
runs-on: ubuntu-latest | |
name: Build Documentation | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Python & Poetry Environment | |
uses: ./.github/actions/python-environment | |
with: | |
python-version: 3.9 | |
- name: Build Documentation | |
run: | | |
poetry run python -m nox -s build-docs | |
checks: | |
runs-on: ubuntu-latest | |
name: Project Checks (Python-${{ matrix.python }}) | |
strategy: | |
fail-fast: false | |
matrix: | |
python: | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
steps: | |
- name: Fetch sqlalchemy_exasol code from repository | |
uses: actions/checkout@v3 | |
- name: Install via apt | |
run: sudo apt-get install unixodbc unixodbc-dev libboost-date-time-dev libboost-locale-dev libboost-system-dev | |
- name: Setup Python & Poetry Environment | |
uses: ./.github/actions/python-environment | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Project Checks (Python-${{ matrix.python }}) | |
run: poetry run nox -s check | |
tests: | |
runs-on: ubuntu-latest | |
needs: [docs, checks] | |
strategy: | |
fail-fast: false | |
matrix: | |
python: | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
connector: | |
- pyodbc | |
- turbodbc | |
- websocket | |
exasol_version: | |
- 7.1.17 | |
- 7.0.20 | |
name: Integration Tests (Python-${{ matrix.python }}, Connector-${{ matrix.connector }}, Exasol-${{ matrix.exasol_version }}) | |
steps: | |
- name: Fetch sqlalchemy_exasol code from repository | |
uses: actions/checkout@v3 | |
- name: Install via apt | |
run: sudo apt-get install unixodbc unixodbc-dev libboost-date-time-dev libboost-locale-dev libboost-system-dev | |
- name: Setup Python & Poetry Environment | |
uses: ./.github/actions/python-environment | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install python project dependencies including trubodbc | |
run: poetry install --extras "turbodbc" | |
if: ${{ matrix.connector == 'turbodbc' }} | |
- name: Run Test for Python ${{ matrix.python }} using ${{ matrix.connector }} | |
run: | | |
poetry run nox -s unit-tests | |
poetry run nox -s integration-tests -- -- --connector ${{ matrix.connector }} --db-version ${{ matrix.exasol_version }} | |
upload_to_pypi: | |
runs-on: ubuntu-latest | |
needs: tests | |
name: Build & Upload Package [PYPI] | |
if: startsWith(github.event.ref, 'refs/tags') | |
strategy: | |
matrix: | |
python: [ 3.8 ] | |
steps: | |
- name: Fetch sqlalchemy_exasol code from repository | |
uses: actions/checkout@v3 | |
- name: Fetch all tags | |
run: git fetch origin +refs/tags/*:refs/tags/* | |
- name: Setup Python & Poetry Environment | |
uses: ./.github/actions/python-environment | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Build and push package to PYPI | |
env: | |
POETRY_HTTP_BASIC_PYPI_USERNAME: "__token__" | |
POETRY_HTTP_BASIC_PYPI_PASSWORD: "${{ secrets.pypi_token }}" | |
run: poetry run nox -s release |