-
Notifications
You must be signed in to change notification settings - Fork 273
75 lines (64 loc) · 2.17 KB
/
test-e2e-prod.yaml
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
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Test E2E (prod)
on:
workflow_dispatch:
schedule:
- cron: '0 * * * *'
jobs:
test-cloud-production:
# This job is copied from "e2e-production" in mobile-dev-inc/monorepo.
# We want it here so open-source users can also have some visibility into it.
runs-on: ubuntu-latest
if: github.repository == 'mobile-dev-inc/maestro'
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 8
- name: Install Maestro
run: |
curl -Ls --retry 3 --retry-all-errors "https://get.maestro.mobile.dev" | bash
echo "${HOME}/.maestro/bin" >> $GITHUB_PATH
- name: Print Maestro version
run: maestro --version
- name: Download samples
run: maestro download-samples
- name: Run iOS test
run: |
maestro cloud \
--apiKey ${{ secrets.E2E_MOBILE_DEV_API_KEY }} \
--timeout 180 \
--fail-on-cancellation \
--include-tags=advanced \
samples/sample.zip samples
- name: Run Android test
run: |
maestro cloud \
--apiKey ${{ secrets.E2E_MOBILE_DEV_API_KEY }} \
--fail-on-cancellation \
--include-tags advanced \
samples/sample.apk samples
- name: Trigger alert on failure
if: ${{ false }}
# if: failure()
run: |
curl --request POST \
--url "https://events.pagerduty.com/v2/enqueue" \
--header 'Content-Type: application/json' \
--data '{
"payload": {
"summary": "E2E test failed",
"source": "E2E test",
"severity": "critical"
},
"routing_key": "${{ secrets.E2E_PAGER_DUTY_INTEGRATION_KEY }}",
"event_action": "trigger",
"links": [
{
"href": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
"text": "Failed E2E test - Github Action"
}
]
}'