-
Notifications
You must be signed in to change notification settings - Fork 229
39 lines (36 loc) · 1.33 KB
/
Copy pathpr-test-gate.yml
File metadata and controls
39 lines (36 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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."