diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 754e26f..56c3d7f 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -8,8 +8,8 @@ on: jobs: - version-check-job: - name: Version Check + Version-Check: + name: Version runs-on: ubuntu-latest steps: @@ -24,9 +24,9 @@ jobs: - name: Check Version(s) run: poetry run version-check `poetry run python -c "from noxconfig import PROJECT_CONFIG; print(PROJECT_CONFIG.version_file)"` - build-documentation-job: - name: Build Documentation - needs: [ version-check-job ] + Documentation: + name: Docs + needs: [ Version-Check ] runs-on: ubuntu-latest steps: @@ -40,9 +40,9 @@ jobs: run: | poetry run python -m nox -s build-docs - lint-job: + Lint: name: Linting (Python-${{ matrix.python-version }}) - needs: [ version-check-job ] + needs: [ Version-Check ] runs-on: ubuntu-latest strategy: fail-fast: false @@ -68,9 +68,9 @@ jobs: path: .lint.txt include-hidden-files: true - type-check-job: + Type-Check: name: Type Checking (Python-${{ matrix.python-version }}) - needs: [ version-check-job ] + needs: [ Version-Check ] runs-on: ubuntu-latest strategy: fail-fast: false @@ -89,9 +89,9 @@ jobs: - name: Run type-check run: poetry run nox -s type-check - security-job: - name: Security Checking (Python-${{ matrix.python-version }}) - needs: [ version-check-job ] + Security: + name: Security Checks (Python-${{ matrix.python-version }}) + needs: [ Version-Check ] runs-on: ubuntu-latest strategy: fail-fast: false @@ -107,7 +107,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Run security + - name: Run security linter run: poetry run nox -s security - name: Upload Artifacts @@ -117,9 +117,9 @@ jobs: path: .security.json include-hidden-files: true - tests-job: + Tests: name: Tests (Python-${{ matrix.python-version }}, Exasol-${{ matrix.exasol-version}}) - needs: [ build-documentation-job, lint-job, type-check-job ] + needs: [ Documentation, Lint, Type-Check, Security] runs-on: ubuntu-latest env: GITHUB_TOKEN: ${{ secrets.ALTERNATIVE_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 009d64c..e027c25 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,9 +14,10 @@ on: - cron: "0 0 1/7 * *" jobs: - ci-job: - uses: ./.github/workflows/checks.yml - metrics: - needs: [ ci-job ] + CI: + uses: ./.github/workflows/merge-gate.yml + + Metrics: + needs: [ CI ] uses: ./.github/workflows/report.yml diff --git a/.github/workflows/merge-gate.yml b/.github/workflows/merge-gate.yml new file mode 100644 index 0000000..7bd7dfe --- /dev/null +++ b/.github/workflows/merge-gate.yml @@ -0,0 +1,35 @@ +name: Merge-Gate + +on: + workflow_call: + secrets: + ALTERNATIVE_GITHUB_TOKEN: + required: false + +jobs: + + fast-checks: + name: Fast + uses: ./.github/workflows/checks.yml + + slow-checks: + name: Slow + runs-on: ubuntu-latest + environment: manual-approval + steps: + - name: Tests + run: | + echo "Approved (Note: This is a dummy)" + + + # This job ensures inputs have been executed successfully. + approve-merge: + name: Mergeable + runs-on: ubuntu-latest + needs: [ fast-checks, slow-checks ] + + # Each job requires a step, so we added this dummy step. + steps: + - name: Approve + run: | + echo "Merge Approved" diff --git a/.github/workflows/report.yml b/.github/workflows/report.yml index 483bfbe..a4f9f4d 100644 --- a/.github/workflows/report.yml +++ b/.github/workflows/report.yml @@ -8,8 +8,7 @@ on: jobs: - report: - name: Generate Status Report + Report: runs-on: ubuntu-latest env: GITHUB_TOKEN: ${{ secrets.ALTERNATIVE_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}