Skip to content

Commit

Permalink
WIP: Merge-Gate
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicoretti committed Sep 26, 2024
1 parent 67bb4c8 commit a4f89ca
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
- name: Run type-check
run: poetry run nox -s type-check

security-job:
security:
name: Security Checking (Python-${{ matrix.python-version }})
needs: [ version-check-job ]
runs-on: ubuntu-latest
Expand Down Expand Up @@ -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: [ build-documentation-job, lint-job, type-check-job, security]
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.ALTERNATIVE_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ on:
- cron: "0 0 1/7 * *"

jobs:
ci-job:
uses: ./.github/workflows/checks.yml

CI:
uses: ./.github/workflows/merge-gate.yml

metrics:
needs: [ ci-job ]
needs: [ CI ]
uses: ./.github/workflows/report.yml
35 changes: 35 additions & 0 deletions .github/workflows/merge-gate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Merge-Gate

on:
workflow_call:
secrets:
ALTERNATIVE_GITHUB_TOKEN:
required: false

jobs:

ci-gate:
name: Fast
uses: ./.github/workflows/checks.yml

# This is an example of a saas-gate e.g. slow tests
saas-gate:
name: Slow
runs-on: ubuntu-latest
environment: manual-trigger
steps:
- name: Slow Tests
run: |
echo "Approved (Note: This is a dummy)"
approve-merge:
name: Mergeable
runs-on: ubuntu-latest
needs: [ ci-gate, saas-gate ]

# Dummy step,
steps:
- name: Approve
run: |
echo "Merge Approved"

0 comments on commit a4f89ca

Please sign in to comment.