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
48 changes: 23 additions & 25 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@ jobs:
run: |
poetry run -- nox -s links:check

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"
Expand All @@ -74,22 +68,23 @@ jobs:
run: poetry run -- nox -s changelog:updated

Lint:
name: Linting (Python-${{ matrix.python-version }})
needs: [ Version-Check, build-matrix ]
name: Linting (Python-${{ matrix.python-versions }})
needs: [ Version-Check ]
runs-on: "ubuntu-24.04"
permissions:
contents: read
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
matrix:
python-versions: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- name: SCM Checkout
uses: actions/checkout@v6

- name: Setup Python & Poetry Environment
uses: ./.github/actions/python-environment
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.python-versions }}
poetry-version: "2.3.0"

- name: Run lint
Expand All @@ -98,21 +93,22 @@ jobs:
- name: Upload Artifacts
uses: actions/upload-artifact@v6
with:
name: lint-python${{ matrix.python-version }}
name: lint-python${{ matrix.python-versions }}
path: |
.lint.txt
.lint.json
include-hidden-files: true

Type-Check:
name: Type Checking (Python-${{ matrix.python-version }})
needs: [ Version-Check, build-matrix ]
name: Type Checking (Python-${{ matrix.python-versions }})
needs: [ Version-Check ]
runs-on: "ubuntu-24.04"
permissions:
contents: read
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
matrix:
python-versions: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- name: SCM Checkout
Expand All @@ -121,21 +117,22 @@ jobs:
- name: Setup Python & Poetry Environment
uses: ./.github/actions/python-environment
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.python-versions }}
poetry-version: "2.3.0"

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

Security:
name: Security Checks (Python-${{ matrix.python-version }})
needs: [ Version-Check, build-matrix ]
name: Security Checks (Python-${{ matrix.python-versions }})
needs: [ Version-Check ]
runs-on: "ubuntu-24.04"
permissions:
contents: read
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
matrix:
python-versions: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- name: SCM Checkout
Expand All @@ -144,7 +141,7 @@ jobs:
- name: Setup Python & Poetry Environment
uses: ./.github/actions/python-environment
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.python-versions }}
poetry-version: "2.3.0"

- name: Run security linter
Expand All @@ -153,7 +150,7 @@ jobs:
- name: Upload Artifacts
uses: actions/upload-artifact@v6
with:
name: security-python${{ matrix.python-version }}
name: security-python${{ matrix.python-versions }}
path: .security.json
include-hidden-files: true

Expand Down Expand Up @@ -214,14 +211,15 @@ jobs:
run: poetry run -- nox -s lint:import

Tests:
name: Unit-Tests (Python-${{ matrix.python-version }})
needs: [ Build-Packages, Lint-Imports, build-matrix ]
name: Unit-Tests (Python-${{ matrix.python-versions }})
needs: [ Build-Packages, Lint-Imports ]
runs-on: "ubuntu-24.04"
permissions:
contents: read
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
matrix:
python-versions: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- name: SCM Checkout
Expand All @@ -233,7 +231,7 @@ jobs:
- name: Setup Python & Poetry Environment
uses: ./.github/actions/python-environment
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.python-versions }}
poetry-version: "2.3.0"

- name: Run Tests and Collect Coverage
Expand All @@ -242,6 +240,6 @@ jobs:
- name: Upload Artifacts
uses: actions/upload-artifact@v6
with:
name: coverage-python${{ matrix.python-version }}-fast
name: coverage-python${{ matrix.python-versions }}-fast
path: .coverage
include-hidden-files: true
4 changes: 4 additions & 0 deletions doc/changes/unreleased.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Unreleased

## Summary

## Feature

* #673: Switched `checks.yml` to get Python versions for matrix from `BaseConfig`
1 change: 1 addition & 0 deletions exasol/toolbox/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,4 +277,5 @@ def github_template_dict(self) -> dict[str, Any]:
"dependency_manager_version": self.dependency_manager.version,
"minimum_python_version": self.minimum_python_version,
"os_version": self.os_version,
"python_versions": self.python_versions,
}
48 changes: 23 additions & 25 deletions exasol/toolbox/templates/github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@ jobs:
run: |
poetry run -- nox -s links:check

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

Changelog:
name: Changelog Update Check
runs-on: "(( os_version ))"
Expand All @@ -74,22 +68,23 @@ jobs:
run: poetry run -- nox -s changelog:updated

Lint:
name: Linting (Python-${{ matrix.python-version }})
needs: [ Version-Check, build-matrix ]
name: Linting (Python-${{ matrix.python-versions }})
needs: [ Version-Check ]
runs-on: "(( os_version ))"
permissions:
contents: read
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
matrix:
python-versions: (( python_versions | tojson ))
steps:
- name: SCM Checkout
uses: actions/checkout@v6

- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@v5
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.python-versions }}
poetry-version: "(( dependency_manager_version ))"

- name: Run lint
Expand All @@ -98,21 +93,22 @@ jobs:
- name: Upload Artifacts
uses: actions/upload-artifact@v6
with:
name: lint-python${{ matrix.python-version }}
name: lint-python${{ matrix.python-versions }}
path: |
.lint.txt
.lint.json
include-hidden-files: true

Type-Check:
name: Type Checking (Python-${{ matrix.python-version }})
needs: [ Version-Check, build-matrix ]
name: Type Checking (Python-${{ matrix.python-versions }})
needs: [ Version-Check ]
runs-on: "(( os_version ))"
permissions:
contents: read
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
matrix:
python-versions: (( python_versions | tojson ))

steps:
- name: SCM Checkout
Expand All @@ -121,21 +117,22 @@ jobs:
- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@v5
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.python-versions }}
poetry-version: "(( dependency_manager_version ))"

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

Security:
name: Security Checks (Python-${{ matrix.python-version }})
needs: [ Version-Check, build-matrix ]
name: Security Checks (Python-${{ matrix.python-versions }})
needs: [ Version-Check ]
runs-on: "(( os_version ))"
permissions:
contents: read
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
matrix:
python-versions: (( python_versions | tojson ))

steps:
- name: SCM Checkout
Expand All @@ -144,7 +141,7 @@ jobs:
- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@v5
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.python-versions }}
poetry-version: "(( dependency_manager_version ))"

- name: Run security linter
Expand All @@ -153,7 +150,7 @@ jobs:
- name: Upload Artifacts
uses: actions/upload-artifact@v6
with:
name: security-python${{ matrix.python-version }}
name: security-python${{ matrix.python-versions }}
path: .security.json
include-hidden-files: true

Expand Down Expand Up @@ -196,14 +193,15 @@ jobs:
run: poetry run -- nox -s package:check

Tests:
name: Unit-Tests (Python-${{ matrix.python-version }})
needs: [ Build-Packages, build-matrix ]
name: Unit-Tests (Python-${{ matrix.python-versions }})
needs: [ Build-Packages ]
runs-on: "(( os_version ))"
permissions:
contents: read
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
matrix:
python-versions: (( python_versions | tojson ))

steps:
- name: SCM Checkout
Expand All @@ -212,7 +210,7 @@ jobs:
- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@v5
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.python-versions }}
poetry-version: "(( dependency_manager_version ))"

- name: Run Tests and Collect Coverage
Expand All @@ -221,6 +219,6 @@ jobs:
- name: Upload Artifacts
uses: actions/upload-artifact@v6
with:
name: coverage-python${{ matrix.python-version }}-fast
name: coverage-python${{ matrix.python-versions }}-fast
path: .coverage
include-hidden-files: true
7 changes: 7 additions & 0 deletions test/unit/config_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ def test_works_as_defined(test_project_config_factory):
"dependency_manager_version": "2.3.0",
"minimum_python_version": "3.10",
"os_version": "ubuntu-24.04",
"python_versions": (
"3.10",
"3.11",
"3.12",
"3.13",
"3.14",
),
},
"minimum_python_version": "3.10",
"os_version": "ubuntu-24.04",
Expand Down