Skip to content

PR Test Gate

PR Test Gate #1160

Workflow file for this run

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."