diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index ef52c23..26a75c9 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -5,160 +5,23 @@ on: jobs: - Version-Check: - name: Version - 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@1.1.0 - - - name: Check Version(s) - run: | - poetry run -- version-check exasol_script_languages_container_ci_setup/version.py - - # removed Documentation as this is not needed in this project - 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.1.0 - - - name: Run changelog update check - run: poetry run -- nox -s changelog:updated - - Lint: - name: Linting (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.1.0 - with: - python-version: ${{ matrix.python-version }} - - - name: Run lint - run: poetry run -- nox -s lint:code - - - name: Upload Artifacts - uses: actions/upload-artifact@v4.6.2 - 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, 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.1.0 - with: - python-version: ${{ matrix.python-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 ] - 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.1.0 - 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.2 - 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.1.0 - - - name: Run format check - run: poetry run -- nox -s project:format - - Tests: - name: Unit-Tests (Python-${{ matrix.python-version }}) - # removed dependency to `Documentation` here - needs: [ Lint, Type-Check, Security, Format, build-matrix ] + Experiment: + name: Get first python version from build matrix + needs: [ build-matrix ] runs-on: ubuntu-24.04 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - strategy: - fail-fast: false - matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }} - + BUILD_MATRIX: ${{ 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.1.0 - with: - python-version: ${{ matrix.python-version }} - - - name: Run Tests and Collect Coverage - run: poetry run -- nox -s test:unit -- --coverage - - - name: Upload Artifacts - uses: actions/upload-artifact@v4.6.2 - with: - name: coverage-python${{ matrix.python-version }}-fast - path: .coverage - include-hidden-files: true + - name: Extract first Python version from build matrix + run: | + echo Build Matrix: "$BUILD_MATRIX" + PYTHON_VERSION=$(echo "$BUILD_MATRIX" | jq '."python-version"[0]') + echo "First python version in Build Matrix: $PYTHON_VERSION" diff --git a/.github/workflows/merge-gate.yml b/.github/workflows/merge-gate.yml index 420cc2c..a763527 100644 --- a/.github/workflows/merge-gate.yml +++ b/.github/workflows/merge-gate.yml @@ -8,20 +8,20 @@ jobs: name: Fast uses: ./.github/workflows/checks.yml - slow-checks: - name: Slow - uses: ./.github/workflows/slow-checks.yml - secrets: inherit #added manually - - # This job ensures inputs have been executed successfully. - approve-merge: - name: Allow Merge - runs-on: ubuntu-24.04 - # If you need additional jobs to be part of the merge gate, add them below - needs: [ fast-checks, slow-checks ] - - # Each job requires a step, so we added this dummy step. - steps: - - name: Approve - run: | - echo "Merge Approved" +# slow-checks: +# name: Slow +# uses: ./.github/workflows/slow-checks.yml +# secrets: inherit #added manually +# +# # This job ensures inputs have been executed successfully. +# approve-merge: +# name: Allow Merge +# runs-on: ubuntu-24.04 +# # If you need additional jobs to be part of the merge gate, add them below +# needs: [ fast-checks, slow-checks ] +# +# # Each job requires a step, so we added this dummy step. +# steps: +# - name: Approve +# run: | +# echo "Merge Approved"