-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
187 lines (182 loc) · 6.43 KB
/
.travis.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
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
branches:
only:
- master
env:
global:
- ANDROID_PACKAGE_JS='seed-js.apk'
- ANDROID_PACKAGE_FOLDER_JS=$TRAVIS_BUILD_DIR/demo/outputs
- ANDROID_PACKAGE_NG='seed-ng.apk'
- ANDROID_PACKAGE_FOLDER_NG=$TRAVIS_BUILD_DIR/demo-angular/outputs
- ANDROID_SAUCE_STORAGE="https://saucelabs.com/rest/v1/storage/$SAUCE_USER"
- IOS_PACKAGE_JS='seed-js.zip'
- IOS_PACKAGE_FOLDER_JS=$TRAVIS_BUILD_DIR/demo/outputs
- IOS_PACKAGE_NG='seed-ng.zip'
- IOS_PACKAGE_FOLDER_NG=$TRAVIS_BUILD_DIR/demo-angular/outputs
- IOS_SAUCE_STORAGE="https://saucelabs.com/rest/v1/storage/$SAUCE_USER"
matrix:
include:
- stage: "Lint"
language: node_js
os: linux
node_js: "10"
script: cd src && npm run ci.tslint
- stage: "Build and Test"
env:
- BuildAndroid="29"
- NodeJs="8"
- Type="TypeScript"
language: android
dist: trusty
os: linux
jdk: oraclejdk8
before_install: nvm install 8
script:
- cd src && npm run postclone gitHubUsername=TheGitHubUser pluginName=ThePlugin initGit=y includeTypeScriptDemo=y includeAngularDemo=n
- npm run build
- cd ../demo
- tns build android
- env:
- BuildAndroid="29"
- Type="TypeScript"
language: android
dist: trusty
os: linux
jdk: oraclejdk8
before_install: nvm install 10
script:
- cd src && npm run postclone gitHubUsername=TheGitHubUser pluginName=ThePlugin initGit=y includeTypeScriptDemo=y includeAngularDemo=n
- npm run tsc
- cd ../demo
- travis_wait travis_retry tns build android --copy-to "$ANDROID_PACKAGE_FOLDER_JS/$ANDROID_PACKAGE_JS"
- "curl -u $SAUCE_USER:$SAUCE_KEY -X POST -H 'Content-Type: application/octet-stream' $ANDROID_SAUCE_STORAGE/$ANDROID_PACKAGE_JS?overwrite=true --data-binary @$ANDROID_PACKAGE_FOLDER_JS/$ANDROID_PACKAGE_JS"
- os: osx
env:
- BuildiOS="12.0"
- Type="TypeScript"
osx_image: xcode11.2
language: node_js
node_js: "10"
jdk: oraclejdk8
script:
- cd src && npm run postclone gitHubUsername=TheGitHubUser pluginName=ThePlugin initGit=y includeTypeScriptDemo=y includeAngularDemo=n
- npm run tsc
- cd ../demo
- travis_wait travis_retry tns build ios --copy-to "./outputs/demo.app"
- cd $IOS_PACKAGE_FOLDER_JS && zip -r $IOS_PACKAGE_JS demo.app
- "curl -u $SAUCE_USER:$SAUCE_KEY -X POST -H 'Content-Type: application/octet-stream' $IOS_SAUCE_STORAGE/$IOS_PACKAGE_JS?overwrite=true --data-binary @$IOS_PACKAGE_FOLDER_JS/$IOS_PACKAGE_JS"
- os: linux
env:
- BuildAndroid="29"
- Type="Angular"
language: android
dist: trusty
jdk: oraclejdk8
before_install: nvm install 10
script:
- cd src && npm run postclone gitHubUsername=TheGitHubUser pluginName=ThePlugin initGit=y includeTypeScriptDemo=n includeAngularDemo=y
- npm run tsc
- cd ../demo-angular
- travis_wait travis_retry tns build android --copy-to "$ANDROID_PACKAGE_FOLDER_NG/$ANDROID_PACKAGE_NG"
- "curl -u $SAUCE_USER:$SAUCE_KEY -X POST -H 'Content-Type: application/octet-stream' $ANDROID_SAUCE_STORAGE/$ANDROID_PACKAGE_NG?overwrite=true --data-binary @$ANDROID_PACKAGE_FOLDER_NG/$ANDROID_PACKAGE_NG"
- os: osx
env:
- BuildiOS="12.0"
- Type="Angular"
osx_image: xcode11.2
language: node_js
node_js: "10"
jdk: oraclejdk8
script:
- cd src && npm run postclone gitHubUsername=TheGitHubUser pluginName=ThePlugin initGit=y includeTypeScriptDemo=n includeAngularDemo=y
- npm run tsc
- cd ../demo-angular
- travis_wait travis_retry tns build ios --copy-to "./outputs/demo-angular.app"
- cd $IOS_PACKAGE_FOLDER_NG && zip -r $IOS_PACKAGE_NG demo-angular.app
- "curl -u $SAUCE_USER:$SAUCE_KEY -X POST -H 'Content-Type: application/octet-stream' $IOS_SAUCE_STORAGE/$IOS_PACKAGE_NG?overwrite=true --data-binary @$IOS_PACKAGE_FOLDER_NG/$IOS_PACKAGE_NG"
- os: linux
language: android
dist: trusty
env:
- UnitTests="Android"
- TestVersion="latest"
jdk: oraclejdk8
before_install:
- nvm install 10
before_script:
- cd seed-tests && npm i
- android list targets
- echo no | android create avd --force -n test -t android-21 -b armeabi-v7a
- emulator -avd test -no-audio -no-window &
- android-wait-for-emulator
script:
- travis_wait travis_retry npm run test.android
- os: osx
env:
- UnitTests="iOS"
- TestVersion="latest"
language: node_js
node_js: "10"
jdk: oraclejdk8
osx_image: xcode11.2
before_script:
- cd seed-tests && npm i
script:
- travis_wait travis_retry npm run test.ios
- stage: "UI Tests"
env:
- Android="24"
- Type="TypeScript"
language: node_js
os: linux
node_js: "10"
script:
- npm i -g appium
- cd seed-tests && npm i
- travis_wait travis_retry npm run e2e -- --runType android24 --sauceLab --appPath $ANDROID_PACKAGE_JS
- os: linux
env:
- Android="24"
- Type="Angular"
language: node_js
os: linux
node_js: "10"
script:
- npm i -g appium
- cd seed-tests && npm i
- travis_wait travis_retry npm run e2e -- --runType android24 --sauceLab --appPath $ANDROID_PACKAGE_NG
- os: linux
env:
- iOS="12.0"
- Type="TypeScript"
language: node_js
node_js: "10"
script:
- npm i -g appium
- cd seed-tests && npm i
- travis_wait travis_retry npm run e2e -- --runType sim12iPhoneX --sauceLab --appPath $IOS_PACKAGE_JS
- os: linux
env:
- iOS="12.0"
- Type="Angular"
language: node_js
node_js: "10"
script:
- npm i -g appium
- cd seed-tests && npm i
- travis_wait travis_retry npm run e2e -- --runType sim12iPhoneX --sauceLab --appPath $IOS_PACKAGE_NG
android:
components:
- tools
- platform-tools
- build-tools-29.0.2
- android-21
- android-29
- extra-android-m2repository
- sys-img-armeabi-v7a-android-21
before_install:
- sudo pip install --upgrade pip
- sudo pip install six
install:
- echo no | npm install -g nativescript
- tns usage-reporting disable
- tns error-reporting disable