Skip to content

CI

CI #538

Workflow file for this run

name: CI
on:
push:
branches-ignore:
- 'master'
pull_request:
branches-ignore:
- 'master'
schedule:
# “At 00:00 on every 7th day-of-month from 1 through 31.” (https://crontab.guru)
- cron: "0 0 1/7 * *"
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 }}
build_package:
runs-on: ubuntu-latest
name: Build Package
needs: tests
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 sdist and wheel packages
run: poetry build