Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicoretti committed Dec 18, 2024
1 parent 7c457d2 commit af83821
Show file tree
Hide file tree
Showing 14 changed files with 34 additions and 147 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

cd-job:
name: Continuous Delivery
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:

- name: SCM Checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-release-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
55 changes: 0 additions & 55 deletions .github/workflows/checks-old.yml

This file was deleted.

25 changes: 11 additions & 14 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

Version-Check:
name: Version
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- name: SCM Checkout
Expand All @@ -22,18 +22,12 @@ jobs:
uses: exasol/python-toolbox/.github/actions/[email protected]

- 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 <<VERSION_PY>>"
echo ""
echo "Note: <<VERSION_PY>> 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
Expand All @@ -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) }}
Expand All @@ -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) }}
Expand All @@ -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) }}
Expand All @@ -126,7 +120,7 @@ jobs:

Format:
name: Format Check
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- name: SCM Checkout
Expand All @@ -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:
Expand All @@ -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

Expand Down
24 changes: 0 additions & 24 deletions .github/workflows/ci-master-old.yml

This file was deleted.

14 changes: 0 additions & 14 deletions .github/workflows/ci-pr-old.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/gh-pages-old.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/matrix-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
all_versions:

runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- name: SCM Checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/matrix-exasol.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
exasol_versions:

runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- name: SCM Checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/matrix-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
python_versions:

runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- name: SCM Checkout
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/merge-gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/pr-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/slow-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand All @@ -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 }}

Expand Down

0 comments on commit af83821

Please sign in to comment.