Skip to content

#296: Updated exasol-toolbox, re-generated GitHub workflows #297

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open
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
7 changes: 3 additions & 4 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@ jobs:
cd-job:
name: Continuous Delivery
runs-on: ubuntu-24.04
permissions:
contents: write
steps:

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

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/[email protected]
with:
poetry-version: 2.1.2
uses: exasol/python-toolbox/.github/actions/[email protected]

- name: Build Artifacts
run: poetry build
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,23 @@ jobs:
check-tag-version-job:
name: Check Release Tag
uses: ./.github/workflows/check-release-tag.yml
permissions:
contents: read

cd-job:
name: Continuous Delivery
uses: ./.github/workflows/build-and-publish.yml
permissions:
contents: write
secrets:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

publish-docs:
needs: [ cd-job ]
name: Publish Documentation
uses: ./.github/workflows/gh-pages.yml
permissions:
contents: read
pages: write
id-token: write

9 changes: 5 additions & 4 deletions .github/workflows/check-release-tag.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
name: Check Release Tag

on: workflow_call
on:
workflow_call:

jobs:

check-tag-version-job:

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

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

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

- name: Check Tag Version
# make sure the pushed/created tag matched the project version
Expand Down
95 changes: 48 additions & 47 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,59 +4,59 @@ on:
workflow_call:

jobs:

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

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

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/[email protected]
with:
poetry-version: 2.1.2
uses: exasol/python-toolbox/.github/actions/[email protected]

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

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/[email protected]
with:
poetry-version: 2.1.2

# This step is disabled, because the project does not support sphinx yet
# - name: Build Documentation
# run: |
# poetry run -- nox -s docs:build
run: poetry run -- nox -s version:check -- version.py

# This step is disabled, because the project does not support sphinx yet
# Documentation:
# name: Docs
# needs: [ Version-Check ]
# runs-on: ubuntu-24.04
# permissions:
# contents: read
# steps:
# - name: SCM Checkout
# uses: actions/checkout@v4
#
# - name: Setup Python & Poetry Environment
# uses: exasol/python-toolbox/.github/actions/[email protected]
#
# - name: Build Documentation
# run: |
# poetry run -- nox -s docs:build

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

Changelog:
name: Changelog Update Check
runs-on: ubuntu-24.04
permissions:
contents: read
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
uses: exasol/python-toolbox/.github/actions/python-environment@1.2.0

- name: Run changelog update check
run: poetry run -- nox -s changelog:updated
Expand All @@ -65,25 +65,25 @@ jobs:
name: Linting (Python-${{ matrix.python-version }})
needs: [ Version-Check, build-matrix ]
runs-on: ubuntu-24.04
permissions:
contents: read
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
uses: exasol/python-toolbox/.github/actions/python-environment@1.2.0
with:
python-version: ${{ matrix.python-version }}
poetry-version: 2.1.2

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

- name: Upload Artifacts
uses: actions/[email protected].0
uses: actions/[email protected].2
with:
name: lint-python${{ matrix.python-version }}
path: |
Expand All @@ -95,6 +95,8 @@ jobs:
name: Type Checking (Python-${{ matrix.python-version }})
needs: [ Version-Check, build-matrix ]
runs-on: ubuntu-24.04
permissions:
contents: read
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
Expand All @@ -104,10 +106,9 @@ jobs:
uses: actions/checkout@v4

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

- name: Run type-check
run: poetry run -- nox -s lint:typing
Expand All @@ -116,6 +117,8 @@ jobs:
name: Security Checks (Python-${{ matrix.python-version }})
needs: [ Version-Check, build-matrix ]
runs-on: ubuntu-24.04
permissions:
contents: read
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
Expand All @@ -125,16 +128,15 @@ jobs:
uses: actions/checkout@v4

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

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

- name: Upload Artifacts
uses: actions/[email protected].0
uses: actions/[email protected].2
with:
name: security-python${{ matrix.python-version }}
path: .security.json
Expand All @@ -143,24 +145,25 @@ jobs:
Format:
name: Format Check
runs-on: ubuntu-24.04

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

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/[email protected]
with:
poetry-version: 2.1.2
uses: exasol/python-toolbox/.github/actions/[email protected]

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


Tests:
name: Unit-Tests (Python-${{ matrix.python-version }})
needs: [ Documentation, Lint, Type-Check, Security, Format, build-matrix ]
# removed Documentation,
needs: [ Lint, Type-Check, Security, Format, build-matrix ]
runs-on: ubuntu-24.04
permissions:
contents: read
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
strategy:
Expand All @@ -172,17 +175,15 @@ jobs:
uses: actions/checkout@v4

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

# This doesn't use nox, because currently the test structure doesn't fit yet
- name: Run Tests and Collect Coverage
run: poetry run -- pytest tests/unit_tests
run: poetry run -- nox -s test:unit -- --coverage

- name: Upload Artifacts
uses: actions/[email protected].0
uses: actions/[email protected].2
with:
name: coverage-python${{ matrix.python-version }}-fast
path: .coverage
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,19 @@ on:
- "main"
- "master"
schedule:
# At 00:00 on every 7th day-of-month from 1 through 31. (https://crontab.guru)
# "At 00:00 on every 7th day-of-month from 1 through 31." (https://crontab.guru)
- cron: "0 0 1/7 * *"

jobs:

CI:
uses: ./.github/workflows/merge-gate.yml
secrets: inherit
permissions:
contents: read

Metrics:
needs: [ CI ]
uses: ./.github/workflows/report.yml
permissions:
contents: read
49 changes: 32 additions & 17 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,44 @@ on:

jobs:

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

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

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/[email protected]
with:
poetry-version: 2.1.2
# These steps are disabled, because the project does not support sphinx yet

# This step is disabled, because the project does not support sphinx yet
# - name: Build Documentation
# run: |
# poetry run -- nox -s docs:multiversion
# - name: Setup Python & Poetry Environment
# uses: exasol/python-toolbox/.github/actions/[email protected]
#
# - name: Build Documentation
# run: |
# poetry run -- nox -s docs:multiversion
# rm -r .html-documentation/*/.doctrees
#
# - name: Deploy
# uses: JamesIves/[email protected]
# with:
# branch: gh-pages
# folder: .html-documentation
# git-config-name: Github Action
# git-config-email: [email protected]
# - name: Upload artifact
# uses: actions/upload-pages-artifact@v3
# with:
# path: .html-documentation

# This job is disabled, because the project does not support sphinx yet

# deploy-documentation:
# needs: [ build-documentation ]
# permissions:
# contents: read
# pages: write
# id-token: write
# environment:
# name: github-pages
# url: ${{ steps.deployment.outputs.page_url }}
# runs-on: ubuntu-24.04
# steps:
# - name: Deploy to GitHub Pages
# id: deployment
# uses: actions/deploy-pages@v4
8 changes: 3 additions & 5 deletions .github/workflows/matrix-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,15 @@ on:

jobs:
all_versions:

runs-on: ubuntu-24.04

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

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/[email protected]
with:
poetry-version: 2.1.2
uses: exasol/python-toolbox/.github/actions/[email protected]

- name: Generate matrix
run: poetry run -- nox -s matrix:all
Expand Down
Loading