Skip to content

Commit

Permalink
Update check job to prevent merge
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonWeng committed Jul 11, 2023
1 parent ef9c6ac commit 734ee34
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 4 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,22 @@ jobs:
integration-test-check:
name: Integration Test Check
runs-on: ubuntu-latest
needs: integration-tests # This job will only run if all 'integration-tests' jobs have completed successfully
needs: integration-tests
if: always()
steps:
- name: Get workflow conclusion
id: workflow_conclusion
run: |
conclusion=$(curl --request GET \
--url https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }} \
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' | jq -r '. | .conclusion')
echo "Test job conclusion: $conclusion"
echo "CONCLUSION=$conclusion" >> $GITHUB_ENV
- name: Check
run: echo "All tests have passed!"
run: |
if [[ "${{ env.CONCLUSION }}" == "success" ]]; then
echo "All tests have passed!"
else
echo "Some or all tests have failed!"
exit 1
fi
19 changes: 17 additions & 2 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,22 @@ jobs:
unit-test-check:
name: Unit Test Check
runs-on: ubuntu-latest
needs: tests # This job will only run if all 'tests' jobs have completed successfully
needs: tests
if: always()
steps:
- name: Get workflow conclusion
id: workflow_conclusion
run: |
conclusion=$(curl --request GET \
--url https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }} \
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' | jq -r '. | .conclusion')
echo "Test job conclusion: $conclusion"
echo "CONCLUSION=$conclusion" >> $GITHUB_ENV
- name: Check
run: echo "All tests have passed!"
run: |
if [[ "${{ env.CONCLUSION }}" == "success" ]]; then
echo "All tests have passed!"
else
echo "Some or all tests have failed!"
exit 1
fi

0 comments on commit 734ee34

Please sign in to comment.