-
Notifications
You must be signed in to change notification settings - Fork 24
47 lines (42 loc) · 1.51 KB
/
run-standalone-mfos-tests.yml
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
40
41
42
43
44
45
46
47
name: MFOS standalone sanity report - CORE,MANAGE,DISCOVERY
on:
repository_dispatch:
types: [trigger-workflow]
pull_request:
types:
- opened
- synchronize
branches: [ next ]
jobs:
RunStandaloneTests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
# Set the branch if the workflow is triggered from external
- name: Set PR Branch based on the trigger
id: set-pr-branch
run: |
if [ "${{ github.event_name }}" == "repository_dispatch" ]; then
echo "OPENRPC_PR_BRANCH='${{ github.event.client_payload.OPENRPC_PR_BRANCH }}'" >> $GITHUB_ENV # Set from payload
else
echo "OPENRPC_PR_BRANCH=''" >> $GITHUB_ENV # Clear the variable for other events
fi
# Run tests
- name: Run Core Manage and Discovery tests and create assets
env:
EVENT_NAME: ${{ github.event_name }}
GITHUB_REF: ${{ github.ref }}
PR_HEAD_REF: ${{ github.event.pull_request.head.ref }}
INTENT: ${{ vars.INTENT }}
OPENRPC_PR_BRANCH: ${{ env.OPENRPC_PR_BRANCH }} # Comes from OPENRPC repo if triggered externally
run: |
./.github/workflows/utils.sh runTests
- name: Upload report.json as an artifact
uses: actions/upload-artifact@v4
with:
name: report
path: ${{ github.workspace }}/report
- name: Get results from report.json
run: |
./.github/workflows/utils.sh getResults