-
Notifications
You must be signed in to change notification settings - Fork 14
104 lines (94 loc) · 3.8 KB
/
Copy pathmaestro.yml
File metadata and controls
104 lines (94 loc) · 3.8 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
100
101
102
103
104
name: Maestro E2E
# Real-backend E2E against the shared test account, so it is not wired to every PR by
# default: run it on demand (choose tags) and nightly (smoke). To gate PRs, add a
# `pull_request:` trigger below — note it needs the test-account secrets, so it won't run
# on fork PRs.
on:
workflow_dispatch:
inputs:
tags:
description: "Maestro include-tags (e.g. smoke, tipping, gate)"
default: "smoke"
exclude_tags:
description: "Maestro exclude-tags (side-effecting flows excluded by default)"
default: "spends-funds,creates-account"
schedule:
- cron: "37 7 * * *" # nightly, off the top of the hour
concurrency:
group: maestro-${{ github.ref }}
cancel-in-progress: true
jobs:
maestro:
name: Maestro E2E (${{ github.event.inputs.tags || 'smoke' }})
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup Java env
uses: actions/setup-java@v3
with:
java-version: "21"
distribution: "corretto"
cache: "gradle"
- name: Setup Ruby env
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.2
bundler-cache: true
# Build prerequisites (same as the unit-test CI job).
- name: Decode Google Services JSON file
uses: timheuer/base64-to-file@v1
with:
fileName: google-services.json
fileDir: ./apps/flipcash/app/src
encodedString: ${{ secrets.FLIPCASH2_GOOGLE_SERVICES }}
- name: Setup local.properties API keys
run: |
{
echo "BUGSNAG_API_KEY=\"${{ secrets.FLIPCASH_BUGSNAG_API_KEY }}\""
echo "MIXPANEL_API_KEY=\"${{ secrets.FLIPCASH_MIXPANEL_API_KEY }}\""
echo "COINBASE_ONRAMP_API_KEY=${{ secrets.COINBASE_ONRAMP_API_KEY }}"
echo "GOOGLE_CLOUD_PROJECT_NUMBER=${{ secrets.GOOGLE_CLOUD_PROJECT_NUMBER }}"
} >> ./local.properties
- name: Install Maestro CLI
run: |
curl -fsSL "https://get.maestro.mobile.dev" | bash
echo "$HOME/.maestro/bin" >> "$GITHUB_PATH"
# KVM is required for a fast x86_64 emulator on GitHub-hosted Linux runners.
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' \
| sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Run Maestro suite on emulator
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 34
arch: x86_64
profile: pixel_6
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim
disable-animations: true
script: bundle exec fastlane android flipcash_maestro
env:
MAESTRO_TAGS: ${{ github.event.inputs.tags || 'smoke' }}
MAESTRO_EXCLUDE_TAGS: ${{ github.event.inputs.exclude_tags || 'spends-funds,creates-account' }}
# Test-account credentials (map GitHub secrets -> the env vars run.sh reads).
SEED_PHRASE: ${{ secrets.MAESTRO_SEED_PHRASE }}
LOGIN_DEEPLINK: ${{ secrets.MAESTRO_LOGIN_DEEPLINK }}
TIPCARD_DEEPLINK: ${{ secrets.MAESTRO_TIPCARD_DEEPLINK }}
USDF_ONLY_DEEPLINK: ${{ secrets.MAESTRO_USDF_ONLY_DEEPLINK }}
CONTACT_NAME: ${{ secrets.MAESTRO_CONTACT_NAME }}
CONTACT_PHONE: ${{ secrets.MAESTRO_CONTACT_PHONE }}
- name: Upload Maestro report
if: always()
uses: actions/upload-artifact@v4
with:
name: maestro-report
path: |
maestro-report.xml
~/.maestro/tests/**
if-no-files-found: ignore