Repository navigation
99 lines (96 loc) · 3.42 KB
/
Copy pathmaestro-cloud-rntester.yml
File metadata and controls
99 lines (96 loc) · 3.42 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
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Maestro Cloud RNTester
permissions:
contents: read
on:
workflow_call:
inputs:
platform:
description: 'Platform name shown in the Maestro Cloud run'
required: true
type: string
artifact-name:
description: 'Name of the RNTester build artifact'
required: true
type: string
download-path:
description: 'Directory where the build artifact is downloaded'
required: true
type: string
app-file:
description: 'Path to the app bundle or APK passed to Maestro Cloud'
required: true
type: string
app-id:
description: 'RNTester application identifier'
required: true
type: string
device-model:
description: 'Device model passed to Maestro Cloud'
required: false
type: string
device-os:
description: 'Device OS passed to Maestro Cloud'
required: false
type: string
exclude-tags:
description: 'Maestro flow tags to exclude'
required: true
type: string
secrets:
MAESTRO_CLOUD_API_KEY:
required: true
jobs:
test:
name: Maestro Cloud ${{ inputs.platform }} RNTester
runs-on: ubuntu-latest
timeout-minutes: 105
steps:
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Download RNTester app
uses: actions/download-artifact@v7
with:
name: ${{ inputs.artifact-name }}
path: ${{ inputs.download-path }}
- name: Validate Maestro Cloud inputs
env:
MAESTRO_APP_FILE: ${{ inputs.app-file }}
MAESTRO_CLOUD_API_KEY: ${{ secrets.MAESTRO_CLOUD_API_KEY }}
MAESTRO_CLOUD_PROJECT_ID: ${{ vars.MAESTRO_CLOUD_PROJECT_ID }}
run: |
test -e "$MAESTRO_APP_FILE"
test -n "$MAESTRO_CLOUD_API_KEY"
test -n "$MAESTRO_CLOUD_PROJECT_ID"
test -z "$(find packages/rn-tester/.maestro -type l -print -quit)"
- name: Run flows on Maestro Cloud
id: maestro-cloud
continue-on-error: true
uses: mobile-dev-inc/action-maestro-cloud@5759506b4ec7ee0a1ece4b7e6574bba2b282f241 # v3.0.1
with:
api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }}
project-id: ${{ vars.MAESTRO_CLOUD_PROJECT_ID }}
app-file: ${{ inputs.app-file }}
workspace: packages/rn-tester/.maestro
branch: ${{ github.head_ref || github.ref_name }}
name: RNTester ${{ inputs.platform }} - ${{ github.event.pull_request.title || github.sha }}
device-model: ${{ inputs.device-model }}
device-os: ${{ inputs.device-os }}
exclude-tags: ${{ inputs.exclude-tags }}
env: |
APP_ID=${{ inputs.app-id }}
maestro-cli-version: 2.6.1
timeout: 90
- name: Check Maestro Cloud result
if: always()
env:
MAESTRO_CLOUD_OUTCOME: ${{ steps.maestro-cloud.outcome }}
MAESTRO_CLOUD_UPLOAD_STATUS: ${{ steps.maestro-cloud.outputs.MAESTRO_CLOUD_UPLOAD_STATUS }}
run: |
if [[ "$MAESTRO_CLOUD_UPLOAD_STATUS" == "STOPPED" ]]; then
echo "::notice::Maestro Cloud run was superseded by a newer upload"
elif [[ "$MAESTRO_CLOUD_OUTCOME" == "failure" ]]; then
echo "::error::Maestro Cloud failed with status ${MAESTRO_CLOUD_UPLOAD_STATUS:-UNKNOWN}"
exit 1
fi