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
6 changes: 2 additions & 4 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,14 @@ jobs:

cd-job:
name: Continuous Delivery
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:

- name: SCM Checkout
uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@0.20.0
with:
poetry-version: 2.0.1
uses: exasol/python-toolbox/.github/actions/python-environment@1.0.1

- name: Build Artifacts
run: poetry build
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/ci-cd.yml → .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI/CD
name: CD

on:
push:
Expand All @@ -11,15 +11,14 @@ jobs:
name: Check Release Tag
uses: ./.github/workflows/check-release-tag.yml

ci-job:
name: Checks
needs: [ check-tag-version-job ]
uses: ./.github/workflows/checks.yml
secrets: inherit

cd-job:
name: Continuous Delivery
needs: [ ci-job ]
uses: ./.github/workflows/build-and-publish.yml
secrets:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

publish-docs:
needs: [ cd-job ]
name: Publish Documentation
uses: ./.github/workflows/gh-pages.yml

7 changes: 3 additions & 4 deletions .github/workflows/check-api-outdated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

check-api-outdated:
name: Check API Outdated
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
strategy:
fail-fast: false

Expand All @@ -26,13 +26,12 @@ jobs:
uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@0.20.0
uses: exasol/python-toolbox/.github/actions/python-environment@1.0.1
with:
poetry-version: 2.0.1
python-version: "3.10"

- name: Run Nox Task api:check-outdated
run: poetry run nox -s api:check-outdated
run: poetry run -- nox -s api:check-outdated

- name: Report Failure Status to Slack Channel
if: ${{ failure() && github.event_name == 'schedule' }}
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/check-release-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@ jobs:
check-tag-version-job:

name: Check Tag Version
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

steps:
- name: SCM Checkout
uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@0.20.0
with:
poetry-version: 2.0.1
uses: exasol/python-toolbox/.github/actions/python-environment@1.0.1

- name: Check Tag Version
# make sure the pushed/created tag matched the project version
Expand Down
135 changes: 98 additions & 37 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
name: Checks

on: workflow_call
on:
workflow_call:

jobs:

version-check-job:
name: Version Check
runs-on: ubuntu-latest
Version-Check:
name: Version
runs-on: ubuntu-24.04

steps:
- name: SCM Checkout
Expand All @@ -15,82 +16,142 @@ jobs:
fetch-depth: 0

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@0.20.0
with:
poetry-version: 2.0.1
uses: exasol/python-toolbox/.github/actions/python-environment@1.0.1

- name: Check Version(s)
run: poetry run version-check version.py
run: poetry run -- version-check version.py

build-documentation-job:
name: Build Documentation
needs: [version-check-job]
runs-on: ubuntu-latest
Documentation:
name: Docs
needs: [ Version-Check ]
runs-on: ubuntu-24.04

steps:
- name: SCM Checkout
uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@0.20.0
with:
poetry-version: 2.0.1
uses: exasol/python-toolbox/.github/actions/python-environment@1.0.1

- name: Build Documentation
run: |
poetry run python -m nox -s docs:build
poetry run -- nox -s docs:build

build-matrix:
name: Generate Build Matrix
uses: ./.github/workflows/matrix-python.yml

Changelog:
name: Changelog Update Check
runs-on: ubuntu-24.04
if: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/master' }}

steps:
- name: SCM Checkout
uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@1.0.1

- name: Run changelog update check
run: poetry run -- nox -s changelog:updated

lint-job:
Lint:
name: Linting (Python-${{ matrix.python-version }})
needs: [version-check-job]
runs-on: ubuntu-latest
needs: [ Version-Check, build-matrix ]
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}

steps:
- name: SCM Checkout
uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@0.20.0
uses: exasol/python-toolbox/.github/actions/python-environment@1.0.1
with:
poetry-version: 2.0.1
python-version: ${{ matrix.python-version }}

- name: Run Tests
run: poetry run nox -s lint:code
- name: Run lint
run: poetry run -- nox -s lint:code

type-check-job:
- name: Upload Artifacts
uses: actions/upload-artifact@v4.6.0
with:
name: lint-python${{ matrix.python-version }}
path: |
.lint.txt
.lint.json
include-hidden-files: true

Type-Check:
name: Type Checking (Python-${{ matrix.python-version }})
needs: [version-check-job]
runs-on: ubuntu-latest
needs: [ Version-Check, build-matrix ]
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}

steps:
- name: SCM Checkout
uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@0.20.0
uses: exasol/python-toolbox/.github/actions/python-environment@1.0.1
with:
poetry-version: 2.0.1
python-version: ${{ matrix.python-version }}

- name: Run Tests
run: poetry run nox -s lint:typing
- name: Run type-check
run: poetry run -- nox -s lint:typing

Security:
name: Security Checks (Python-${{ matrix.python-version }})
needs: [ Version-Check, build-matrix ]
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}

steps:
- name: SCM Checkout
uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@1.0.1
with:
python-version: ${{ matrix.python-version }}

- name: Run security linter
run: poetry run -- nox -s lint:security

- name: Upload Artifacts
uses: actions/upload-artifact@v4.6.0
with:
name: security-python${{ matrix.python-version }}
path: .security.json
include-hidden-files: true

Format:
name: Format Check
runs-on: ubuntu-24.04

steps:
- name: SCM Checkout
uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@1.0.1

- name: Run format check
run: poetry run -- nox -s project:format

tests-job:
name: Tests (Python-${{ matrix.python-version }})
needs: [build-documentation-job, lint-job, type-check-job]
needs: [ Documentation, Lint, Type-Check, Security, Format, build-matrix ]
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
uses: ./.github/workflows/run-tests.yml
secrets: inherit
with:
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
name: CI

on:
pull_request:
push:
branches-ignore:
- "github-pages/*"
- "gh-pages/*"
- "main"
- "master"

jobs:

Expand All @@ -17,14 +22,14 @@ jobs:
gate-1:
name: Gate 1 - Regular CI
needs: [ ci-job ]
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Branch Protection
run: true

slow-test-detection:
name: Run Slow or Expensive Tests (e.g. SaaS)?
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Detect Slow Tests
run: true
Expand All @@ -42,7 +47,7 @@ jobs:

gate-2:
name: Gate 2 - Allow Merge
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
needs: [ run-slow-tests ]
steps:
- name: Branch Protection
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
name: Publish Documentation

on: workflow_call
on:
workflow_call:
workflow_dispatch:

jobs:

documentation-job:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

steps:
- name: SCM Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@0.20.0
with:
poetry-version: 2.0.1
uses: exasol/python-toolbox/.github/actions/python-environment@1.0.1

- name: Build Documentation
run: |
poetry run python -m nox -s docs:build
poetry run -- nox -s docs:multiversion

- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4.4.1
uses: JamesIves/github-pages-deploy-action@v4.7.2
with:
branch: gh-pages
folder: .html-documentation
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/matrix-python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build Matrix (Python)

on:
workflow_call:
outputs:
matrix:
description: "Generates the python version build matrix"
value: ${{ jobs.python_versions.outputs.matrix }}

jobs:
python_versions:

runs-on: ubuntu-24.04

steps:
- name: SCM Checkout
uses: actions/checkout@v4

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@1.0.1

- name: Generate matrix
run: poetry run -- nox -s matrix:python

- id: set-matrix
run: |
echo "matrix=$(poetry run -- nox -s matrix:python)" >> $GITHUB_OUTPUT

outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
Loading