-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#427: Implemented GH approval for slow tests #428
Changes from all commits
0f18b6b
a55c379
2d3f225
b63be38
3f6eb6a
ff8b57e
8b22d34
c2f5d3b
abd3bda
776aff1
daddfb6
53fd5db
c0ffcd3
b78bb8e
7ea138f
b0f74aa
a6e935a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,4 +21,3 @@ jobs: | |
needs: [ cd-job ] | ||
name: Publish Documentation | ||
uses: ./.github/workflows/gh-pages.yml | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,6 @@ name: Checks | |
|
||
on: | ||
workflow_call: | ||
secrets: | ||
ALTERNATIVE_GITHUB_TOKEN: | ||
required: false | ||
|
||
jobs: | ||
|
||
|
@@ -19,7 +16,7 @@ jobs: | |
fetch-depth: 0 | ||
|
||
- name: Setup Python & Poetry Environment | ||
uses: exasol/python-toolbox/.github/actions/python-environment@0.17.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Some workflows use dashes Could you please unify all workflows to use the same separator? I propose dashes |
||
uses: exasol/python-toolbox/.github/actions/python-environment@0.20.0 | ||
|
||
- name: Check Version(s) | ||
run: | | ||
|
@@ -35,27 +32,30 @@ jobs: | |
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python & Poetry Environment | ||
uses: exasol/python-toolbox/.github/actions/python-environment@0.17.0 | ||
uses: exasol/python-toolbox/.github/actions/python-environment@0.20.0 | ||
|
||
- name: Build Documentation | ||
run: | | ||
poetry run python -m nox -s docs:build | ||
|
||
build-matrix: | ||
name: Generate Build Matrix | ||
uses: ./.github/workflows/matrix-python.yml | ||
|
||
Lint: | ||
name: Linting (Python-${{ matrix.python-version }}) | ||
needs: [ Version-Check ] | ||
needs: [ Version-Check, build-matrix ] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we use unified style for job names? |
||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.9", "3.10", "3.11"] | ||
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@0.17.0 | ||
uses: exasol/python-toolbox/.github/actions/python-environment@0.20.0 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
|
@@ -71,19 +71,18 @@ jobs: | |
|
||
Type-Check: | ||
name: Type Checking (Python-${{ matrix.python-version }}) | ||
needs: [ Version-Check ] | ||
needs: [ Version-Check, build-matrix ] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.9", "3.10", "3.11"] | ||
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@0.17.0 | ||
uses: exasol/python-toolbox/.github/actions/python-environment@0.20.0 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
|
@@ -92,19 +91,18 @@ jobs: | |
|
||
Security: | ||
name: Security Checks (Python-${{ matrix.python-version }}) | ||
needs: [ Version-Check ] | ||
needs: [ Version-Check, build-matrix ] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [ "3.9", "3.10", "3.11" ] | ||
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@0.17.0 | ||
uses: exasol/python-toolbox/.github/actions/python-environment@0.20.0 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
|
@@ -118,6 +116,18 @@ jobs: | |
path: .security.json | ||
include-hidden-files: true | ||
|
||
Tests: | ||
name: Tests | ||
uses: ./.github/workflows/tests_with_coverage.yml | ||
Format: | ||
name: Format Check | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: SCM Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python & Poetry Environment | ||
uses: exasol/python-toolbox/.github/actions/python-environment@0.20.0 | ||
with: | ||
python-version: "3.9" | ||
|
||
- name: Run format check | ||
run: poetry run nox -s project:format |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,56 @@ | ||
name: CI | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The workflow The first one is passed as a parameter to the workflow while the second one seems to be inherited. |
||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- "github-pages/*" | ||
- "gh-pages/*" | ||
- "main" | ||
- "master" | ||
pull_request: | ||
types: [opened, reopened] | ||
schedule: | ||
# “At 00:00 on every 7th day-of-month from 1 through 31.” (https://crontab.guru) | ||
- cron: "0 0 1/7 * *" | ||
|
||
jobs: | ||
|
||
CI: | ||
uses: ./.github/workflows/merge-gate.yml | ||
secrets: inherit | ||
checks: | ||
name: Checks | ||
uses: ./.github/workflows/checks.yml | ||
|
||
Metrics: | ||
needs: [ CI ] | ||
fast-tests: | ||
name: Fast Tests | ||
uses: ./.github/workflows/fast-tests.yml | ||
|
||
slow-tests-approval: | ||
name: Approve Slow Tests | ||
runs-on: ubuntu-latest | ||
|
||
# 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). | ||
environment: manual-approval | ||
|
||
# Replace the steps below with the required actions | ||
# and/or add additional jobs if required | ||
# Note: | ||
# If you add additional jobs, make sure they are added as a requirement | ||
# to the approve-merge job's input requirements (needs). | ||
steps: | ||
- name: Tests | ||
run: echo "Slow tests approved" | ||
|
||
slow-tests: | ||
name: Slow Tests | ||
needs: slow-tests-approval | ||
uses: ./.github/workflows/slow-tests.yml | ||
#Do not inherit secrets because ITDE Slow Tests does not need it | ||
|
||
metrics: | ||
name: Report Metrics | ||
needs: [ checks, fast-tests ] | ||
uses: ./.github/workflows/report.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: [ checks, fast-tests, slow-tests ] | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Allow Merge should not depend on metrics |
||
# Each job requires a step, so we added this dummy step. | ||
steps: | ||
- name: Approve | ||
run: echo "Merge Approved" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Fast Tests | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
ALTERNATIVE_GITHUB_TOKEN: | ||
required: false | ||
|
||
jobs: | ||
build-matrix: | ||
name: Generate Build Matrix | ||
uses: ./.github/workflows/matrix-python.yml | ||
|
||
fast-tests: | ||
name: Unit-Tests (Python-${{ matrix.python-version }}, Exasol-${{ matrix.exasol-version}}) | ||
needs: [ build-matrix ] | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.ALTERNATIVE_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} | ||
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@0.20.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.4.0 | ||
with: | ||
name: coverage-python${{ matrix.python-version }}-fast | ||
path: .coverage | ||
include-hidden-files: true | ||
|
||
db-version-minimal-tests: | ||
name: Run Db Versions Minimal Tests | ||
uses: ./.github/workflows/test-db-versions-minimal.yml | ||
|
||
test-docker-starter: | ||
name: Test Docker Starter | ||
uses: ./.github/workflows/test-docker-starter.yml | ||
|
||
test-shell-scripts: | ||
name: Test Shell Scripts | ||
uses: ./.github/workflows/test-shell-scripts.yml |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Build Matrix (Python) | ||
|
||
on: | ||
workflow_call: | ||
outputs: | ||
matrix: | ||
description: "Generates the python version build matrix" | ||
value: ${{ jobs.python_versions.outputs.matrix }} | ||
|
||
jobs: | ||
python_versions: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: SCM Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python & Poetry Environment | ||
uses: exasol/python-toolbox/.github/actions/python-environment@0.20.0 | ||
|
||
- name: Generate matrix | ||
run: poetry run nox -s matrix:python | ||
|
||
- id: set-matrix | ||
run: | | ||
echo "matrix=$(poetry run nox -s matrix:python)" >> $GITHUB_OUTPUT | ||
|
||
outputs: | ||
matrix: ${{ steps.set-matrix.outputs.matrix }} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Periodic Validation | ||
|
||
on: | ||
schedule: | ||
# “At 00:00 on every 7th day-of-month from 1 through 31.” (https://crontab.guru) | ||
- cron: "0 0 1/7 * *" | ||
|
||
jobs: | ||
|
||
checks: | ||
name: Checks | ||
uses: ./.github/workflows/checks.yml | ||
|
||
fast-tests: | ||
name: Fast Tests | ||
uses: ./.github/workflows/fast-tests.yml | ||
|
||
slow-tests: | ||
name: Slow Tests | ||
uses: ./.github/workflows/slow-tests.yml | ||
#Do not inherit secrets because ITDE Slow Tests does not need it | ||
|
||
metrics: | ||
name: Report Metrics | ||
needs: [ checks, fast-tests ] | ||
uses: ./.github/workflows/report.yml | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly from
Only removed execution of unit test + upload of coverage -> Is now handled in
tests_with_converage.yml