forked from LedgerHQ/ledger-live-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (65 loc) · 2.3 KB
/
detox-ci.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
name: Detox E2E CI
on:
pull_request:
branches:
- "*"
workflow_dispatch:
inputs:
prNumber:
description: pr number to trigger on
required: true
schedule:
- cron: "0 0 * * *"
jobs:
ios:
runs-on: macos-latest
steps:
- name: Checkout PR
uses: actions/checkout@v2
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6 # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Install applesimutils
run: |
brew tap wix/brew
brew install applesimutils
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: 14
cache: 'yarn'
- name: Has hash commit deps
uses: ledgerhq/actions/packages/has-hash-commit-deps@main
id: has-hash-commit-deps
with:
workspace: ${{ github.workspace }}
- name: Install dependencies without network concurrency
if: ${{ steps.has-hash-commit-deps.outputs.has-hash-commit-deps == 'true' }}
env:
JOBS: max
run: yarn --prefer-offline --frozen-lockfile --network-timeout 100000 --network-concurrency 1
- name: Install dependencies with network concurrency
if: ${{ steps.has-hash-commit-deps.outputs.has-hash-commit-deps == 'false' }}
env:
JOBS: max
run: yarn --prefer-offline --frozen-lockfile --network-timeout 100000
- name: Rebuild detox
run: yarn detox clean-framework-cache && yarn detox build-framework-cache
- name: Build iOS app for Detox test run
env:
NODE_OPTIONS: "--max-old-space-size=7168"
run: yarn e2e:build -c ios.staging
- name: Test iOS app
timeout-minutes: 15
run: yarn e2e:test -c ios.staging --loglevel verbose --record-logs failing --record-timeline all --take-screenshots all --record-videos failing --detectOpenHandles
- name: Upload test artifacts
if: always()
uses: actions/upload-artifact@v2
with:
name: test-ios-artifacts
path: artifacts