forked from Path-Check/safeplaces-dct-app
-
Notifications
You must be signed in to change notification settings - Fork 0
190 lines (154 loc) · 4.97 KB
/
Copy pathtest.yml
File metadata and controls
190 lines (154 loc) · 4.97 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
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
name: Test
on:
push:
branches:
- develop
- release-candidate
- master
pull_request:
branches:
- develop
- release-candidate
- master
jobs:
unit-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: node --version
- name: Cache node_modules/
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.OS }}-yarn-cache-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-yarn-cache-
- run: yarn --frozen-lockfile
- run: yarn test
env:
CI: true
e2e-ios-build:
runs-on: macOS-latest
# while this job doesn't depend on the previous job explicitly
# this will force them not to run in parallel. If they're run in parallel,
# the node_modules caches will conflict
needs: unit-test
timeout-minutes: 15
env:
DEVELOPER_DIR: /Applications/Xcode_11.4.app
steps:
- uses: actions/checkout@master
- name: Cache node_modules/
uses: actions/cache@v1
id: cache
with:
path: node_modules
key: ${{ runner.OS }}-yarn-cache-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-yarn-cache-
- name: Rebuild detox
if: steps.cache.outputs.cache-hit == 'true'
run: yarn detox-setup
- name: Install Node Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile
- name: Cache ruby gems
uses: actions/cache@v1
with:
path: ios/vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Install ruby gems (including Cocoapods)
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
working-directory: ./ios
- name: Cache CocoaPods
uses: actions/cache@v1
with:
path: ios/Pods
key: ${{ runner.OS }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.OS }}-pods-
- run: pod install --repo-update
working-directory: ./ios
- run: yarn build:e2e:ios
- uses: actions/upload-artifact@v1
with:
name: e2e-ios-bin
path: ios/build/Build/Products/Release-iphonesimulator/COVIDSafePaths.app
e2e-iphone11:
runs-on: macOS-latest
needs: e2e-ios-build
timeout-minutes: 15
env:
DEVELOPER_DIR: /Applications/Xcode_11.4.app
steps:
- uses: actions/checkout@master
- name: Cache node_modules/
uses: actions/cache@v1
id: cache
with:
path: node_modules
key: ${{ runner.OS }}-yarn-cache-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-yarn-cache-
- name: Rebuild detox
if: steps.cache.outputs.cache-hit == 'true'
run: yarn detox-setup
- name: Install Node Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile
- run: brew tap wix/brew
- run: brew install applesimutils
- uses: actions/download-artifact@master
with:
name: e2e-ios-bin
path: ios/build/Build/Products/Release-iphonesimulator/COVIDSafePaths.app
- run: yarn test:e2e:iphone11
- name: Upload Screenshots
if: always()
uses: actions/upload-artifact@v1
with:
name: iPhone 11 screenshots
path: e2e/artifacts
e2e-iphone-se:
runs-on: macOS-latest
needs: e2e-ios-build
timeout-minutes: 15
env:
DEVELOPER_DIR: /Applications/Xcode_11.4.app
steps:
- uses: actions/checkout@master
- name: Cache node_modules/
uses: actions/cache@v1
id: cache
with:
path: node_modules
key: ${{ runner.OS }}-yarn-cache-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-yarn-cache-
- name: Rebuild detox
if: steps.cache.outputs.cache-hit == 'true'
run: yarn detox-setup
- name: Install Node Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile
- run: brew tap wix/brew
- run: brew install applesimutils
# - run: xcrun simctl list devicetypes
# - run: xcrun simctl list runtimes
- run: xcrun simctl create "iPhone SE" com.apple.CoreSimulator.SimDeviceType.iPhone-SE com.apple.CoreSimulator.SimRuntime.iOS-13-4
- run: xcrun simctl list
- uses: actions/download-artifact@master
with:
name: e2e-ios-bin
path: ios/build/Build/Products/Release-iphonesimulator/COVIDSafePaths.app
- run: yarn test:e2e:iphone-se
- name: Upload Screenshots
if: always()
uses: actions/upload-artifact@v1
with:
name: iPhone SE screenshots
path: e2e/artifacts