-
-
Notifications
You must be signed in to change notification settings - Fork 345
109 lines (91 loc) · 3.36 KB
/
e2e-tests-ios.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
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
105
106
107
108
109
name: E2E tests (ios)
# TODO:
# Skip steps if cached
# Android + iOS maestro tests by environment
# PR flow that includes all testing + build in a different step from maestro
# Cache pods
on:
workflow_dispatch:
push:
jobs:
e2e-maestro-ios:
name: Build
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14.18.1
cache: 'yarn'
- uses: actions/cache@v3
id: cache
with:
path: |
./examples/Rn071/ios/DerivedData/Build/Products/Release-iphonesimulator/Rn071.app
./examples/Rn071/ios/DerivedData/Build/Products/Release-iphonesimulator/Rn071.app.dSYM
key: ${{ runner.os }}-${{ hashFiles('src/**', 'ios/**', 'examples/Rn071/src/**') }}
- name: Install npm dependencies (example project)
if: steps.cache.outputs.cache-hit != 'true'
working-directory: ./examples/Rn071/
run: yarn install --frozen-lockfile
- name: Install npm dependencies (root)
if: steps.cache.outputs.cache-hit != 'true'
working-directory: ./
run: yarn install --frozen-lockfile
- name: Setup Ruby
if: steps.cache.outputs.cache-hit != 'true'
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
working-directory: ./examples/Rn071/
- name: setup-cocoapods
if: steps.cache.outputs.cache-hit != 'true'
uses: maxim-lobanov/setup-cocoapods@v1
with:
version: 1.11.3
- name: Install CocoaPods
if: steps.cache.outputs.cache-hit != 'true'
working-directory: ./examples/Rn071/
run: |
yarn pods
- name: Select Xcode
if: steps.cache.outputs.cache-hit != 'true'
run: sudo xcode-select -s /Applications/Xcode_$(<.xcode-version).app/Contents/Developer
- name: Build
if: steps.cache.outputs.cache-hit != 'true'
working-directory: ./examples/Rn071/ios/
run: |
set -o pipefail && xcodebuild \
-workspace "Rn071.xcworkspace" \
-scheme "Rn071" \
-destination "platform=iOS Simulator,name=iPhone 14,OS=16.4" \
-derivedDataPath "DerivedData" \
-configuration "Release" \
| tee xcodebuild.log
e2e-ios:
name: e2e tests
runs-on: macos-13
environment: e2e
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
id: cache
with:
path: |
./examples/Rn071/ios/DerivedData/Build/Products/Release-iphonesimulator/Rn071.app
./examples/Rn071/ios/DerivedData/Build/Products/Release-iphonesimulator/Rn071.app.dSYM
key: ${{ runner.os }}-${{ hashFiles('src/**', 'ios/**', 'examples/Rn071/src/**') }}
- uses: mobile-dev-inc/action-maestro-cloud@v1.8.0
with:
api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }}
app-file: ./examples/Rn071/ios/DerivedData/Build/Products/Release-iphonesimulator/Rn071.app
mapping-file: ./examples/Rn071/ios/DerivedData/Build/Products/Release-iphonesimulator/Rn071.app.dSYM
include-tags: ios
- name: Upload logs when workflow failed
uses: actions/upload-artifact@v3
if: failure()
with:
name: BuildLogs
path: |
xcodebuild.log
DerivedData/Logs/Test/*.xcresult