From af83821cfad9de263f0da62cc4c20fc01e2942e8 Mon Sep 17 00:00:00 2001 From: Nicola Coretti Date: Wed, 18 Dec 2024 08:46:10 +0100 Subject: [PATCH] Update workflows --- .github/workflows/build-and-publish.yml | 2 +- .github/workflows/check-release-tag.yml | 2 +- .github/workflows/checks-old.yml | 55 ------------------------- .github/workflows/checks.yml | 25 +++++------ .github/workflows/ci-master-old.yml | 24 ----------- .github/workflows/ci-pr-old.yml | 14 ------- .github/workflows/gh-pages-old.yml | 32 -------------- .github/workflows/matrix-all.yml | 2 +- .github/workflows/matrix-exasol.yml | 2 +- .github/workflows/matrix-python.yml | 2 +- .github/workflows/merge-gate.yml | 8 +++- .github/workflows/pr-merge.yml | 6 +++ .github/workflows/report.yml | 2 +- .github/workflows/slow-checks.yml | 5 ++- 14 files changed, 34 insertions(+), 147 deletions(-) delete mode 100644 .github/workflows/checks-old.yml delete mode 100644 .github/workflows/ci-master-old.yml delete mode 100644 .github/workflows/ci-pr-old.yml delete mode 100644 .github/workflows/gh-pages-old.yml diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index dffc299..129c497 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -10,7 +10,7 @@ jobs: cd-job: name: Continuous Delivery - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: SCM Checkout diff --git a/.github/workflows/check-release-tag.yml b/.github/workflows/check-release-tag.yml index 31989d3..362ca22 100644 --- a/.github/workflows/check-release-tag.yml +++ b/.github/workflows/check-release-tag.yml @@ -7,7 +7,7 @@ jobs: check-tag-version-job: name: Check Tag Version - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: SCM Checkout diff --git a/.github/workflows/checks-old.yml b/.github/workflows/checks-old.yml deleted file mode 100644 index d93dae9..0000000 --- a/.github/workflows/checks-old.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: CI Checks - -on: - workflow_call: - - -jobs: - - unit-tests: - name: Unit Tests - runs-on: ubuntu-22.04 - strategy: - fail-fast: true - matrix: - python-version: [ "3.9", "3.10", "3.11", "3.12" ] - - steps: - - name: SCM Checkout - uses: actions/checkout@v4 - - - name: Setup Python & Poetry Environment - uses: exasol/python-toolbox/.github/actions/python-environment@0.13.0 - with: - python-version: ${{ matrix.python-version }} - - - name: "Install all extras" - run: poetry install --all-extras - - - name: Run Tests - run: | - poetry run nox -s test:unit - - integration-tests: - name: Integration Tests - runs-on: ubuntu-22.04 - strategy: - fail-fast: true - matrix: - python-version: [ "3.9", "3.10", "3.11", "3.12" ] - - steps: - - name: SCM Checkout - uses: actions/checkout@v4 - - - name: Setup Python & Poetry Environment - uses: exasol/python-toolbox/.github/actions/python-environment@0.13.0 - with: - python-version: ${{ matrix.python-version }} - - - name: "Install all extras" - run: poetry install --all-extras - - - name: Run Tests - run: | - poetry run nox -s test:integration diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 20a8f81..dee9492 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -10,7 +10,7 @@ jobs: Version-Check: name: Version - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: SCM Checkout @@ -22,18 +22,12 @@ jobs: uses: exasol/python-toolbox/.github/actions/python-environment@0.20.0 - name: Check Version(s) - run: | - echo "Please enable the version check by replacing this output with shell command bellow:" - echo "" - echo "poetry run version-check <>" - echo "" - echo "Note: <> needs to point to the version file of the project (version.py)." - exit 1 + run: poetry run version-check `poetry run python -c "from noxconfig import PROJECT_CONFIG; print(PROJECT_CONFIG.version_file)"` Documentation: name: Docs needs: [ Version-Check ] - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: SCM Checkout @@ -53,7 +47,7 @@ jobs: Lint: name: Linting (Python-${{ matrix.python-version }}) needs: [ Version-Check, build-matrix ] - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }} @@ -80,7 +74,7 @@ jobs: Type-Check: name: Type Checking (Python-${{ matrix.python-version }}) needs: [ Version-Check, build-matrix ] - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }} @@ -100,7 +94,7 @@ jobs: Security: name: Security Checks (Python-${{ matrix.python-version }}) needs: [ Version-Check, build-matrix ] - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: ${{ fromJson(needs.build-matrix.outputs.matrix) }} @@ -126,7 +120,7 @@ jobs: Format: name: Format Check - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: SCM Checkout @@ -143,7 +137,7 @@ jobs: Tests: name: Unit-Tests (Python-${{ matrix.python-version }}, Exasol-${{ matrix.exasol-version}}) needs: [ Documentation, Lint, Type-Check, Security, Format, build-matrix ] - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 env: GITHUB_TOKEN: ${{ secrets.ALTERNATIVE_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} strategy: @@ -159,6 +153,9 @@ jobs: with: python-version: ${{ matrix.python-version }} + - name: "Install all extras" + run: poetry install --all-extras + - name: Run Tests and Collect Coverage run: poetry run nox -s test:unit -- -- --coverage diff --git a/.github/workflows/ci-master-old.yml b/.github/workflows/ci-master-old.yml deleted file mode 100644 index 598c34c..0000000 --- a/.github/workflows/ci-master-old.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Continuous Integration (Master) - -on: - push: - branches: - - "master" - - "main" - schedule: - # “At 00:00 on every 7th day-of-month from 1 through 31.” (https://crontab.guru) - - cron: "0 0 1/7 * *" - -jobs: - verify: - uses: ./.github/workflows/checks.yml - - examples: - uses: ./.github/workflows/examples.yml - - ssl_cert: - uses: ./.github/workflows/ssl_cert.yml - - publish-docs: - name: Publish Documentation - uses: ./.github/workflows/gh-pages.yml diff --git a/.github/workflows/ci-pr-old.yml b/.github/workflows/ci-pr-old.yml deleted file mode 100644 index 1cf3b69..0000000 --- a/.github/workflows/ci-pr-old.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Continuous Integration (PR) - -on: - pull_request: - -jobs: - verify: - uses: ./.github/workflows/checks.yml - - examples: - uses: ./.github/workflows/examples.yml - - ssl_cert: - uses: ./.github/workflows/ssl_cert.yml diff --git a/.github/workflows/gh-pages-old.yml b/.github/workflows/gh-pages-old.yml deleted file mode 100644 index 3193f79..0000000 --- a/.github/workflows/gh-pages-old.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Publish Documentation - -on: - workflow_call: - workflow_dispatch: - -jobs: - - documentation-job: - runs-on: ubuntu-latest - - 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.18.0 - - - name: Build Documentation - run: | - poetry run nox -s docs:multiversion - - - name: Deploy - uses: JamesIves/github-pages-deploy-action@v4.6.0 - with: - branch: gh-pages - folder: .html-documentation - git-config-name: Github Action - git-config-email: opensource@exasol.com - diff --git a/.github/workflows/matrix-all.yml b/.github/workflows/matrix-all.yml index eeeb379..eae9274 100644 --- a/.github/workflows/matrix-all.yml +++ b/.github/workflows/matrix-all.yml @@ -10,7 +10,7 @@ on: jobs: all_versions: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: SCM Checkout diff --git a/.github/workflows/matrix-exasol.yml b/.github/workflows/matrix-exasol.yml index 7d11ef5..2cde00e 100644 --- a/.github/workflows/matrix-exasol.yml +++ b/.github/workflows/matrix-exasol.yml @@ -10,7 +10,7 @@ on: jobs: exasol_versions: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: SCM Checkout diff --git a/.github/workflows/matrix-python.yml b/.github/workflows/matrix-python.yml index 58a618a..e9913e5 100644 --- a/.github/workflows/matrix-python.yml +++ b/.github/workflows/matrix-python.yml @@ -10,7 +10,7 @@ on: jobs: python_versions: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: SCM Checkout diff --git a/.github/workflows/merge-gate.yml b/.github/workflows/merge-gate.yml index f9e7aa2..35eb6df 100644 --- a/.github/workflows/merge-gate.yml +++ b/.github/workflows/merge-gate.yml @@ -16,12 +16,18 @@ jobs: name: Slow uses: ./.github/workflows/slow-checks.yml + examples: + uses: ./.github/workflows/examples.yml + + ssl_cert: + uses: ./.github/workflows/ssl_cert.yml + # This job ensures inputs have been executed successfully. approve-merge: name: Allow Merge runs-on: ubuntu-latest # If you need additional jobs to be part of the merge gate, add them below - needs: [ fast-checks, slow-checks ] + needs: [ fast-checks, slow-checks, examples, ssl_cert ] # Each job requires a step, so we added this dummy step. steps: diff --git a/.github/workflows/pr-merge.yml b/.github/workflows/pr-merge.yml index e4be010..5305b57 100644 --- a/.github/workflows/pr-merge.yml +++ b/.github/workflows/pr-merge.yml @@ -16,6 +16,12 @@ jobs: uses: ./.github/workflows/checks.yml secrets: inherit + examples: + uses: ./.github/workflows/examples.yml + + ssl_cert: + uses: ./.github/workflows/ssl_cert.yml + publish-docs: name: Publish Documentation uses: ./.github/workflows/gh-pages.yml diff --git a/.github/workflows/report.yml b/.github/workflows/report.yml index a84f9fe..f8dd893 100644 --- a/.github/workflows/report.yml +++ b/.github/workflows/report.yml @@ -9,7 +9,7 @@ on: jobs: report: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 env: GITHUB_TOKEN: ${{ secrets.ALTERNATIVE_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/slow-checks.yml b/.github/workflows/slow-checks.yml index efb95c0..26efc79 100644 --- a/.github/workflows/slow-checks.yml +++ b/.github/workflows/slow-checks.yml @@ -15,7 +15,7 @@ jobs: Tests: name: Integration-Tests (Python-${{ matrix.python-version }}, Exasol-${{ matrix.exasol-version}}) needs: [ build-matrix ] - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 # Even though the environment "manual-approval" will be created automatically, # it still needs to be configured to require interactive review. # See project settings on GitHub (Settings / Environments / manual-approval). @@ -35,6 +35,9 @@ jobs: with: python-version: ${{ matrix.python-version }} + - name: "Install all extras" + run: poetry install --all-extras + - name: Run Tests and Collect Coverage run: poetry run nox -s test:integration -- -- --coverage --db-version ${{ matrix.exasol-version }}