-
Notifications
You must be signed in to change notification settings - Fork 15
62 lines (62 loc) · 2.03 KB
/
e2e-runner.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Trigger on Comment
on:
issue_comment:
types: [created]
permissions:
contents: read
issues: read
pull-requests: read
statuses: write
jobs:
parse-args:
if: github.event.issue.pull_request && startsWith(github.event.comment.body, '/run e2e')
runs-on: ubuntu-latest
steps:
- name: Parse relayer version
id: relay
run: |
echo "RELAYER_VERSION=$(echo ${{ github.event.comment.body }} | sed -n 's/.*\/run e2e \(.*\)/\1/p')" >> $GITHUB_ENV
outputs:
relayer_version: ${{ steps.relay.outputs.RELAYER_VERSION }}
start-runner:
needs: parse-args
uses: ./.github/workflows/runner-start.yml
secrets: inherit
with:
relayer_version: ${{ needs.parse-args.outputs.relayer_version }}
e2e:
name: E2E tests
runs-on: ${{ needs.start-runner.outputs.label }}
needs: start-runner
steps:
- name: Get PR branch
uses: xt0rted/pull-request-comment-branch@v2
id: comment-branch
- name: Set latest commit status as pending
uses: myrotvorets/set-commit-status-action@master
with:
sha: ${{ steps.comment-branch.outputs.head_sha }}
token: ${{ secrets.GITHUB_TOKEN }}
status: pending
- name: Checkout PR branch
uses: actions/checkout@v3
with:
ref: ${{ steps.comment-branch.outputs.head_ref }}
- name: Run e2e tests
run: ./scripts/execute-test.sh --clean --use-docker --build-ibc --build-xcall --xcall-branch main --test e2e
- name: Set latest commit status as ${{ job.status }}
uses: myrotvorets/set-commit-status-action@master
if: always()
with:
sha: ${{ steps.comment-branch.outputs.head_sha }}
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ job.status }}
stop-runner:
uses: ./.github/workflows/runner-stop.yml
secrets: inherit
with:
label: ${{ needs.start-runner.outputs.label }}
ec2-instance-id: ${{ needs.start-runner.outputs.ec2-instance-id }}
needs:
- start-runner
- e2e