Skip to content

Fix gh-pages issues(s) (#521) #102

Fix gh-pages issues(s) (#521)

Fix gh-pages issues(s) (#521) #102

Workflow file for this run

name: CI-CD
on:
push:
branches:
- 'master'
tags:
- '**'
jobs:
docs:
runs-on: ubuntu-latest
name: Build Documentation
steps:
- name: Checkout
uses: actions/checkout@v4
- 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 docs:build
checks:
runs-on: ubuntu-latest
name: Project Checks (Python-${{ matrix.python }})
strategy:
fail-fast: false
matrix:
python:
- "3.9"
- "3.10"
steps:
- name: Fetch sqlalchemy_exasol code from repository
uses: actions/checkout@v4
- 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.9"
- "3.10"
connector:
- pyodbc
- turbodbc
- websocket
exasol_version:
- 7.1.17
name: Integration Tests (Python-${{ matrix.python }}, Connector-${{ matrix.connector }}, Exasol-${{ matrix.exasol_version }})
steps:
- name: Fetch sqlalchemy_exasol code from repository
uses: actions/checkout@v4
- 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 turbodbc
run: poetry install --all-extras
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.9 ]
steps:
- name: Fetch sqlalchemy_exasol code from repository
uses: actions/checkout@v4
- 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