PR Test Gate #1162
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: PR Test Gate | |
| on: | |
| workflow_run: | |
| workflows: ["CI"] | |
| types: [completed] | |
| jobs: | |
| contracts-test: | |
| name: Contracts cargo test | |
| runs-on: ubuntu-latest | |
| if: github.event.workflow_run.event == 'pull_request' | |
| steps: | |
| - name: Verify CI succeeded for the pull request | |
| env: | |
| CI_CONCLUSION: ${{ github.event.workflow_run.conclusion }} | |
| PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number }} | |
| run: | | |
| if [ "$CI_CONCLUSION" != "success" ]; then | |
| echo "CI workflow failed for pull request #${PR_NUMBER}." | |
| exit 1 | |
| fi | |
| echo "CI workflow succeeded for pull request #${PR_NUMBER}; no duplicate contract run is required." | |
| backend-test: | |
| name: Backend npm test | |
| runs-on: ubuntu-latest | |
| if: github.event.workflow_run.event == 'pull_request' | |
| steps: | |
| - name: Verify CI succeeded for the pull request | |
| env: | |
| CI_CONCLUSION: ${{ github.event.workflow_run.conclusion }} | |
| PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number }} | |
| run: | | |
| if [ "$CI_CONCLUSION" != "success" ]; then | |
| echo "CI workflow failed for pull request #${PR_NUMBER}." | |
| exit 1 | |
| fi | |
| echo "CI workflow succeeded for pull request #${PR_NUMBER}; no duplicate backend run is required." |