Skip to content

Commit

Permalink
Testing if we skip running the test [SKIP TEST]
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinsingla committed May 3, 2024
1 parent 6f5b975 commit a092612
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,26 @@ env:
GITHUB_TOKEN: ${{ github.token }}

jobs:
check_commit:
runs-on: ubuntu-latest
outputs:
skip: ${{ steps.check.outputs.skip }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Check commit message
id: check
run: |
MESSAGE=$(git log --format=%B -n 1 ${{ github.event.after }})
if [[ "$MESSAGE" == *"[SKIP TEST]"* ]]; then
echo "Commit message contains [SKIP TEST]. Skipping tests."
echo "::set-output name=skip::true"
else
echo "::set-output name=skip::false"
fi
e2e-test-run:
needs: check_commit
if: needs.check_commit.outputs.skip == 'false'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down

0 comments on commit a092612

Please sign in to comment.