|
1 |
| -name: Testing E2E |
| 1 | +name: Testing E2E Android |
2 | 2 |
|
3 | 3 | on:
|
4 | 4 | pull_request:
|
|
20 | 20 | - '**/*.md'
|
21 | 21 |
|
22 | 22 | jobs:
|
23 |
| - # ------------------ |
24 |
| - # Android |
25 |
| - # ------------------ |
26 | 23 | android:
|
27 | 24 | name: Android
|
28 | 25 | runs-on: macos-latest
|
@@ -208,159 +205,3 @@ jobs:
|
208 | 205 | with:
|
209 | 206 | name: adb_logs
|
210 | 207 | path: adb-log.txt.gz
|
211 |
| - |
212 |
| - # ------------------ |
213 |
| - # iOS |
214 |
| - # ------------------ |
215 |
| - ios: |
216 |
| - name: iOS |
217 |
| - runs-on: macos-latest |
218 |
| - # TODO matrix across APIs, at least 10 and 13 (lowest to highest) |
219 |
| - timeout-minutes: 60 |
220 |
| - env: |
221 |
| - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
222 |
| - steps: |
223 |
| - |
224 |
| - with: |
225 |
| - all_but_latest: true |
226 |
| - |
227 |
| - - uses: actions/checkout@v2 |
228 |
| - with: |
229 |
| - fetch-depth: 50 |
230 |
| - |
231 |
| - - uses: actions/setup-node@v2 |
232 |
| - with: |
233 |
| - node-version: 14 |
234 |
| - |
235 |
| - - uses: maxim-lobanov/setup-xcode@v1 |
236 |
| - with: |
237 |
| - xcode-version: latest-stable |
238 |
| - |
239 |
| - - name: Install firebase CLI |
240 |
| - uses: nick-invision/retry@v2 |
241 |
| - with: |
242 |
| - timeout_minutes: 10 |
243 |
| - retry_wait_seconds: 60 |
244 |
| - max_attempts: 3 |
245 |
| - command: npm i -g firebase-tools |
246 |
| - |
247 |
| - - name: Cache Firestore Emulator |
248 |
| - uses: actions/cache@v2 |
249 |
| - with: |
250 |
| - path: ~/.cache/firebase/emulators |
251 |
| - key: firebase-emulators-v1 |
252 |
| - |
253 |
| - - name: Start Firestore Emulator |
254 |
| - run: yarn tests:emulator:start-ci |
255 |
| - |
256 |
| - - name: Get Xcode version |
257 |
| - id: xcode-version |
258 |
| - run: echo "::set-output name=xcode-version::$(xcodebuild -version|tail -1|cut -f3 -d' ')" |
259 |
| - |
260 |
| - - name: Get yarn cache directory path |
261 |
| - id: yarn-cache-dir-path |
262 |
| - run: echo "::set-output name=dir::$(yarn cache dir)" |
263 |
| - |
264 |
| - - uses: actions/cache@v2 |
265 |
| - name: Yarn Cache |
266 |
| - id: yarn-cache |
267 |
| - with: |
268 |
| - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} |
269 |
| - key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }}-v1 |
270 |
| - |
271 |
| - - uses: actions/cache@v2 |
272 |
| - name: Cache Pods |
273 |
| - with: |
274 |
| - path: tests/ios/Pods |
275 |
| - key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}-v1 |
276 |
| - |
277 |
| - - uses: actions/cache@v2 |
278 |
| - name: Detox Framework Cache |
279 |
| - with: |
280 |
| - path: ~/Library/Detox/ios |
281 |
| - key: ${{ runner.os }}-detox-framework-cache-${{ steps.xcode-version.outputs.xcode-version }} |
282 |
| - |
283 |
| - - name: Yarn Install |
284 |
| - uses: nick-invision/retry@v2 |
285 |
| - with: |
286 |
| - timeout_minutes: 10 |
287 |
| - retry_wait_seconds: 60 |
288 |
| - max_attempts: 3 |
289 |
| - command: yarn --no-audit --prefer-offline |
290 |
| - |
291 |
| - - name: Update Ruby build tools |
292 |
| - uses: nick-invision/retry@v2 |
293 |
| - with: |
294 |
| - timeout_minutes: 10 |
295 |
| - retry_wait_seconds: 60 |
296 |
| - max_attempts: 3 |
297 |
| - command: gem update cocoapods xcodeproj |
298 |
| - |
299 |
| - - name: Pod Install |
300 |
| - uses: nick-invision/retry@v2 |
301 |
| - with: |
302 |
| - timeout_minutes: 10 |
303 |
| - retry_wait_seconds: 60 |
304 |
| - max_attempts: 3 |
305 |
| - command: yarn tests:ios:pod:install |
306 |
| - |
307 |
| - - name: Build iOS App |
308 |
| - run: | |
309 |
| - export SKIP_BUNDLING=1 |
310 |
| - export RCT_NO_LAUNCH_PACKAGER=1 |
311 |
| - cd tests |
312 |
| - set -o pipefail |
313 |
| - ./node_modules/.bin/detox build --configuration ios.sim.debug |
314 |
| - shell: bash |
315 |
| - |
316 |
| - - name: Install applesimutils |
317 |
| - uses: nick-invision/retry@v2 |
318 |
| - with: |
319 |
| - timeout_minutes: 10 |
320 |
| - retry_wait_seconds: 60 |
321 |
| - max_attempts: 3 |
322 |
| - command: HOMEBREW_NO_AUTO_UPDATE=1 brew tap wix/brew && HOMEBREW_NO_AUTO_UPDATE=1 brew install applesimutils && applesimutils --list |
323 |
| - |
324 |
| - - name: Pre-fetch Javascript bundle |
325 |
| - run: | |
326 |
| - nohup yarn tests:packager:jet & |
327 |
| - printf 'Waiting for packager to come online' |
328 |
| - until curl --output /dev/null --silent --head --fail http://localhost:8081/status; do |
329 |
| - printf '.' |
330 |
| - sleep 2 |
331 |
| - done |
332 |
| - echo "Packager is online! Preparing bundle..." |
333 |
| - curl --output /dev/null --silent --head --fail "http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&inlineSourceMap=true" |
334 |
| - echo "...javascript bundle ready" |
335 |
| -
|
336 |
| - - name: Create Simulator Log |
337 |
| - # With a little delay so the detox test below has time to spawn it, missing the first part of boot is fine |
338 |
| - # If you boot the simulator separately from detox, some other race fails and detox testee never sends ready to proxy |
339 |
| - continue-on-error: true |
340 |
| - run: nohup sh -c "sleep 30 && xcrun simctl spawn booted log stream --level debug --style compact > simulator.log 2>&1 &" |
341 |
| - |
342 |
| - - name: Detox Test |
343 |
| - timeout-minutes: 40 |
344 |
| - run: | |
345 |
| - cd tests |
346 |
| - ./node_modules/.bin/nyc ./node_modules/.bin/detox test --debug-synchronization 200 --configuration ios.sim.debug --cleanup |
347 |
| -
|
348 |
| - - name: Compress Simulator Log |
349 |
| - if: always() |
350 |
| - run: gzip -9 simulator.log |
351 |
| - |
352 |
| - - name: Upload Simulator Log |
353 |
| - uses: actions/upload-artifact@v2 |
354 |
| - if: always() |
355 |
| - with: |
356 |
| - name: simulator_logs |
357 |
| - path: simulator.log.gz |
358 |
| - |
359 |
| - - name: Submit Coverage |
360 |
| - # This can fail on timeouts etc, wrap with retry |
361 |
| - uses: nick-invision/retry@v2 |
362 |
| - with: |
363 |
| - timeout_minutes: 10 |
364 |
| - retry_wait_seconds: 60 |
365 |
| - max_attempts: 3 |
366 |
| - command: ./node_modules/.bin/codecov |
0 commit comments