-
Notifications
You must be signed in to change notification settings - Fork 28
153 lines (119 loc) · 4.7 KB
/
demo-expo-app.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
name: Demo Expo App
on: [pull_request]
jobs:
run-visual-regression-ios:
runs-on: macos-11
# Disable the Expo example test for now, as I'm getting a XCode 65 error which I havent been able to resolve yet.
# The tests do run locally, so I'm not sure what the issue is.
if: ${{ false }}
steps:
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: actions/checkout@v2
- name: Get Runner Information
run: /usr/bin/xcodebuild -version
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-expo-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-expo-yarn-
- name: Install Dependencies (Library)
run: yarn install --frozen-lockfile
working-directory: ./
- name: Compile the library
run: yarn build
working-directory: ./
- name: Install Dependencies (Example Expo App)
run: yarn install --frozen-lockfile
working-directory: ./ExpoExample
- name: Install CocoaPods Gem
run: gem install cocoapods -v 1.11.0
- uses: actions/cache@v2
with:
path: ./example/ios/Pods
key: ${{ runner.os }}-expo-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-expo-pods-
- name: Expo prebuild
run: yarn expo prebuild --platform ios
working-directory: ./ExpoExample
- uses: futureware-tech/simulator-action@v1
with:
model: 'iPhone 13 Pro'
os_version: '>=15.0'
- name: Run Owl Build
run: yarn owl:build:ios
working-directory: ./ExpoExample
- name: Run Owl Test
run: yarn owl:test:ios
working-directory: ./ExpoExample
- name: Store screenshots and report as artifacts
uses: actions/upload-artifact@v2
if: failure()
with:
name: owl-results
path: ExpoExample/.owl
run-visual-regression-android:
runs-on: macos-11
if: ${{ false }}
steps:
- uses: actions/checkout@v2
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-expo-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-expo-yarn-
- name: Install Dependencies (Library)
run: yarn install --frozen-lockfile
working-directory: ./
- name: Compile the library
run: yarn build
working-directory: ./
- name: Install Dependencies (Example Expo App)
run: yarn install --frozen-lockfile
working-directory: ./ExpoExample
- name: Expo prebuild
run: yarn expo prebuild --platform android
working-directory: ./ExpoExample
- uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-expo-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-expo-gradle-
- name: SKDs - download required images
run: $ANDROID_HOME/tools/bin/sdkmanager "system-images;android-30;default;x86_64"
- name: SDKs - accept licenses
run: y | $ANDROID_HOME/tools/bin/sdkmanager --licenses
- name: Emulator - Create
run: $ANDROID_HOME/tools/bin/avdmanager create avd -n Pixel_API_30 --device 'Nexus 5X' --package "system-images;android-30;default;x86_64" --sdcard 512M
- name: Emulator - Boot
run: $ANDROID_HOME/emulator/emulator -memory 4096 -avd Pixel_API_30 -wipe-data -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim &
- name: ADB Wait For Device
run: adb wait-for-any-device
timeout-minutes: 3
- name: Run Owl Build
run: yarn owl:build:android
working-directory: ./ExpoExample
- name: Run Owl Test
run: yarn owl:test:android
working-directory: ./ExpoExample
- name: Store screenshots as artifacts
uses: actions/upload-artifact@v2
if: failure()
with:
name: owl-screenshots
path: ExpoExample/.owl