Skip to content

Commit 4eb676e

Browse files
Add circleci config for iOS e2e tests
1 parent 9b0b74e commit 4eb676e

File tree

3 files changed

+59
-4
lines changed

3 files changed

+59
-4
lines changed

.circleci/config.yml

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,7 @@ jobs:
115115
command: cd android && ./gradlew androidDependencies
116116
- run:
117117
name: Run UnitTest
118-
command: cd android && ./gradlew test
119-
118+
command: cd android && ./gradlew test
120119

121120
ios_test:
122121
macos:
@@ -140,6 +139,40 @@ jobs:
140139
name: Build and run tests
141140
command: xcodebuild -workspace InstabugSample.xcworkspace -scheme InstabugSample -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone X,OS=12.2' test | xcpretty
142141

142+
e2e_ios:
143+
macos:
144+
xcode: "10.2.0"
145+
working_directory: ~/project/InstabugSample
146+
environment:
147+
FL_OUTPUT_DIR: output
148+
steps:
149+
- checkout:
150+
path: ~/project
151+
- run:
152+
name: Install React Native CLI
153+
command: npm install -g react-native-cli
154+
- run:
155+
name: Install Detox CLI
156+
command: npm install -g detox-cli
157+
- run:
158+
name: Install Detox Utils
159+
command: brew tap wix/brew && brew install applesimutils
160+
- run:
161+
name: Install node_modules
162+
command: yarn
163+
- run:
164+
name: Fetch CocoaPods Specs
165+
command: cd ios && curl https://cocoapods-specs.circleci.com/fetch-cocoapods-repo-from-s3.sh | bash -s cf
166+
- run:
167+
name: Install CocoaPods
168+
command: cd ios && pod install
169+
- run:
170+
name: Detox - Build Release App
171+
command: detox build --configuration ios.sim.release
172+
- run:
173+
name: Detox - Run E2E Tests
174+
command: detox test --configuration ios.sim.release --cleanup
175+
143176
publish:
144177
macos:
145178
xcode: "10.1.0"
@@ -150,7 +183,6 @@ jobs:
150183
- run: cd Escape/.build/release; cp -f Escape /usr/local/bin/escape
151184
- run: Escape react-native publish
152185

153-
154186
workflows:
155187
version: 2
156188
publish:
@@ -160,12 +192,14 @@ workflows:
160192
- test_sample
161193
- test_android
162194
- ios_test
195+
- e2e_ios
163196
- hold:
164197
requires:
165198
- test_module
166199
- test_sample
167200
- test_android
168201
- ios_test
202+
- e2e_ios
169203
type: approval
170204
filters:
171205
branches:

InstabugSample/ios/InstabugSample/Images.xcassets/AppIcon.appiconset/Contents.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
{
22
"images" : [
3+
{
4+
"idiom" : "iphone",
5+
"size" : "20x20",
6+
"scale" : "2x"
7+
},
8+
{
9+
"idiom" : "iphone",
10+
"size" : "20x20",
11+
"scale" : "3x"
12+
},
313
{
414
"idiom" : "iphone",
515
"size" : "29x29",
@@ -29,6 +39,11 @@
2939
"idiom" : "iphone",
3040
"size" : "60x60",
3141
"scale" : "3x"
42+
},
43+
{
44+
"idiom" : "ios-marketing",
45+
"size" : "1024x1024",
46+
"scale" : "1x"
3247
}
3348
],
3449
"info" : {

InstabugSample/package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"scripts": {
66
"start": "react-native start",
7-
"test": "jest",
7+
"test": "jest __tests__",
88
"lint": "eslint ."
99
},
1010
"dependencies": {
@@ -36,6 +36,12 @@
3636
"build": "xcodebuild -workspace ios/InstabugSample.xcworkspace -scheme InstabugSample -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build",
3737
"type": "ios.simulator",
3838
"name": "iPhone X"
39+
},
40+
"ios.sim.release": {
41+
"binaryPath": "ios/build/Build/Products/Release-iphonesimulator/InstabugSample.app",
42+
"build": "xcodebuild -workspace ios/InstabugSample.xcworkspace -scheme InstabugSample -configuration Release -sdk iphonesimulator -derivedDataPath ios/build",
43+
"type": "ios.simulator",
44+
"name": "iPhone X"
3945
}
4046
},
4147
"test-runner": "jest"

0 commit comments

Comments
 (0)