6
6
branches : [ master ]
7
7
workflow_dispatch :
8
8
jobs :
9
+ cancel_previous :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+
13
+ with :
14
+ workflow_id : ${{ github.event.workflow.id }}
9
15
build-and-test :
16
+ needs : cancel_previous
10
17
runs-on : ' ubuntu-latest'
11
18
steps :
12
19
- uses : actions/checkout@v2
@@ -29,33 +36,51 @@ jobs:
29
36
run : yarn build:plugins
30
37
31
38
run-e2e-ios :
39
+ needs : cancel_previous
32
40
runs-on : ' macos-11'
33
41
steps :
34
42
- uses : actions/checkout@v2
43
+
35
44
- uses : actions/setup-node@v2
36
45
with :
37
46
node-version : ' 14'
38
47
cache : ' yarn'
48
+
39
49
- uses : maxim-lobanov/setup-xcode@v1
40
50
with :
41
51
xcode-version : 12.5.1
52
+
53
+ - name : Cocoapods cache
54
+ uses : actions/cache@v2
55
+ with :
56
+ path : ./example/ios/Pods
57
+ key : ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
58
+ restore-keys : |
59
+ ${{ runner.os }}-pods-
60
+
42
61
- name : Install applesimutils
43
62
run : |
44
63
HOMEBREW_NO_AUTO_UPDATE=1 brew tap wix/brew >/dev/null
45
64
HOMEBREW_NO_AUTO_UPDATE=1 brew install applesimutils >/dev/null
46
65
- run : yarn install
47
- - run : yarn bootstrap
66
+
67
+ - name : Bootstrap
68
+ run : yarn bootstrap
69
+
48
70
- name : Run Server (with mocks)
49
71
run : yarn example start:e2e &
72
+
50
73
- name : Detox - Build
51
74
run : yarn example e2e:build:ios
75
+
52
76
- name : Detox - Test
53
77
run : |
54
78
yarn example detox clean-framework-cache
55
79
yarn example detox build-framework-cache
56
80
yarn example e2e:test:ios
57
81
58
82
run-e2e-android :
83
+ needs : cancel_previous
59
84
runs-on : ' macos-11' # This is important, linux cannot run the emulator graphically for e2e tests
60
85
strategy :
61
86
matrix :
@@ -103,7 +128,8 @@ jobs:
103
128
node-version : ' 14'
104
129
cache : ' yarn'
105
130
106
- - run : yarn example && yarn # No need to run bootstrap here since we don't need cocoapods
131
+ - name : Bootstrap
132
+ run : yarn example && yarn # No need to run bootstrap here since we don't need cocoapods
107
133
- name : Run Server (with mocks)
108
134
run : yarn example start:e2e &
109
135
- name : Detox - Build
0 commit comments