Skip to content

Commit

Permalink
Revert "only run one workflow"
Browse files Browse the repository at this point in the history
This reverts commit 7e83e1f.
  • Loading branch information
cortisiko committed Oct 18, 2024
1 parent 7e83e1f commit 4cf5078
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 58 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/add-e2e-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Add E2E Label to PR

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
label-pr:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v3

- name: Apply labels to PR
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr edit ${{ github.event.pull_request.number }} --add-label "Run Smoke E2E"
116 changes: 58 additions & 58 deletions .github/workflows/e2e-merge-queue-status-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,37 +15,37 @@ on:
- synchronize

jobs:
# is-fork-pull-request:
# name: Determine pull request source
# if: ${{ github.event.issue.pull_request || github.event_name == 'pull_request' }}
# runs-on: ubuntu-latest
# outputs:
# IS_FORK: ${{ steps.is-fork.outputs.IS_FORK }}
# steps:
# - uses: actions/checkout@v3
# - name: Determine whether this PR is from a fork
# id: is-fork
# run: |
# echo "IS_FORK=$(gh pr view --json isCrossRepository --jq '.isCrossRepository' "${PR_NUMBER}" )" >> "$GITHUB_OUTPUT"
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# PR_NUMBER: ${{ github.event.number || github.event.issue.number }}
is-fork-pull-request:
name: Determine pull request source
if: ${{ github.event.issue.pull_request || github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
outputs:
IS_FORK: ${{ steps.is-fork.outputs.IS_FORK }}
steps:
- uses: actions/checkout@v3
- name: Determine whether this PR is from a fork
id: is-fork
run: |
echo "IS_FORK=$(gh pr view --json isCrossRepository --jq '.isCrossRepository' "${PR_NUMBER}" )" >> "$GITHUB_OUTPUT"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.number || github.event.issue.number }}

# is-documentation-pull-request:
# name: Check if pull request is for documentation
# runs-on: ubuntu-latest
# outputs:
# IS_DOCS_PR: ${{ steps.is-docs.outputs.IS_DOCS_PR }}
# steps:
# - uses: actions/checkout@v3
# - name: Check if docs PR
# id: is-docs
# run: |
# if [[ "${{ startsWith(github.event.pull_request.title, 'docs:') }}" == "true" ]]; then
# echo "Is a documentation PR, will skip running e2e"
# else
# echo "Is not a documentation PR will proceed to running tests"
# fi
is-documentation-pull-request:
name: Check if pull request is for documentation
runs-on: ubuntu-latest
outputs:
IS_DOCS_PR: ${{ steps.is-docs.outputs.IS_DOCS_PR }}
steps:
- uses: actions/checkout@v3
- name: Check if docs PR
id: is-docs
run: |
if [[ "${{ startsWith(github.event.pull_request.title, 'docs:') }}" == "true" ]]; then
echo "Is a documentation PR, will skip running e2e"
else
echo "Is not a documentation PR will proceed to running tests"
fi
check-if-bitrise-ran:
name: Check if E2E comment is success
Expand Down Expand Up @@ -78,31 +78,31 @@ jobs:
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# e2e-all-jobs-pass:
# name: All jobs pass
# runs-on: ubuntu-20.04
# needs:
# [
# is-fork-pull-request,
# check-if-bitrise-ran,
# is-documentation-pull-request
# ]
# outputs:
# ALL_JOBS_PASSED: ${{ steps.jobs-passed-status.outputs.ALL_JOBS_PASSED }}
# steps:
# - name: Set jobs passed status
# id: jobs-passed-status
# run: echo "ALL_JOBS_PASSED=true" >> "$GITHUB_OUTPUT"
# check-all-jobs-pass:
# name: Check all jobs pass
# runs-on: ubuntu-20.04
# needs: e2e-all-jobs-pass
# if: always()
# steps:
# - run: |
# if [[ "${{ needs.all-jobs-pass.outputs.ALL_JOBS_PASSED }}" == "true" ]]; then
# echo "All jobs passed. Unblock PR."
# else
# echo "All jobs passed step skipped. Block PR."
# exit 1
# fi
e2e-all-jobs-pass:
name: All jobs pass
runs-on: ubuntu-20.04
needs:
[
is-fork-pull-request,
check-if-bitrise-ran,
is-documentation-pull-request
]
outputs:
ALL_JOBS_PASSED: ${{ steps.jobs-passed-status.outputs.ALL_JOBS_PASSED }}
steps:
- name: Set jobs passed status
id: jobs-passed-status
run: echo "ALL_JOBS_PASSED=true" >> "$GITHUB_OUTPUT"
check-all-jobs-pass:
name: Check all jobs pass
runs-on: ubuntu-20.04
needs: e2e-all-jobs-pass
if: always()
steps:
- run: |
if [[ "${{ needs.all-jobs-pass.outputs.ALL_JOBS_PASSED }}" == "true" ]]; then
echo "All jobs passed. Unblock PR."
else
echo "All jobs passed step skipped. Block PR."
exit 1
fi

0 comments on commit 4cf5078

Please sign in to comment.