diff --git a/.github/workflows/merge-gate-extension.yml b/.github/workflows/merge-gate-extension.yml index b51f2b488..0543e5751 100644 --- a/.github/workflows/merge-gate-extension.yml +++ b/.github/workflows/merge-gate-extension.yml @@ -4,9 +4,57 @@ on: workflow_call: jobs: + build-python-matrix: + name: Build Python Matrix + uses: $/.github/workflows/matrix.yml + with: + matrix_keys_json: '["python_versions"]' + permissions: + contents: read + + get-maximum-python-version: + name: Get Maximum Python Version + needs: + - build-python-matrix + runs-on: "ubuntu-26.04" + permissions: + contents: read + outputs: + maximum-python-version: ${{ steps.get-maximum-python-version.outputs.python-version }} + steps: + - name: Get Maximum Python Version + id: get-maximum-python-version + env: + PYTHON_VERSIONS_MATRIX: ${{ needs.build-python-matrix.outputs.matrix }} + run: | + maximum_python_version="$(jq -r '.python_versions | max_by(split(".") | map(tonumber))' <<< "$PYTHON_VERSIONS_MATRIX")" + echo "python-version=$maximum_python_version" >> "$GITHUB_OUTPUT" + + check-format-maximum-python: + name: Check Format (Python-${{ needs.get-maximum-python-version.outputs.maximum-python-version }}) + needs: + - get-maximum-python-version + runs-on: "ubuntu-26.04" + permissions: + contents: read + steps: + - name: Check out Repository + uses: actions/checkout@v7 + with: + persist-credentials: false + + - name: Set up Python & Poetry Environment + uses: exasol/python-toolbox/.github/actions/python-environment@v11 + with: + python-version: ${{ needs.get-maximum-python-version.outputs.maximum-python-version }} + poetry-version: "2.3.0" + + - name: Check Format + run: poetry run -- nox -s format:check + approve-run-slow-tests: name: Approve Running Slow Tests? - runs-on: "ubuntu-24.04" + runs-on: "ubuntu-26.04" permissions: contents: read environment: manual-approval diff --git a/noxconfig.py b/noxconfig.py index b91f59617..c6620c102 100644 --- a/noxconfig.py +++ b/noxconfig.py @@ -85,4 +85,5 @@ def importlinter(self) -> Path: # The PTB does not have integration tests running with an Exasol DB. exasol_versions=(), plugins_for_nox_sessions=(UpdateTemplates,), + python_versions=("3.10", "3.11", "3.12"), ) diff --git a/test/resources/isort_stdlib_transition.py b/test/resources/isort_stdlib_transition.py new file mode 100644 index 000000000..ead219c07 --- /dev/null +++ b/test/resources/isort_stdlib_transition.py @@ -0,0 +1,4 @@ +"""Formatting fixture for modules removed from the Python standard library.""" + +import cgi # noqa: F401 +import json # noqa: F401