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 5086def
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ jobs:

tests-job:
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-job]
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 5086def

Please sign in to comment.