forked from dynamifylimited/cordova-plugin-antitampering
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
192 lines (183 loc) · 4.92 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
188
189
190
191
192
matrix:
include:
- &linux
os: linux
sudo: false
language: android
jdk: oraclejdk8
android:
components:
- tools
- platform-tools
- android-22
- build-tools-25.0.2
env:
- NODE_VERS=8
- CORDOVA_VERS=5
- PLATFORM=android
- PLATFORM_VERS=5.1
- PACKAGE_EXT=apk
- CACHE_NAME=a5c5
- &macosx
os: osx
language: objective-c
osx_image: xcode8.3
env:
- NODE_VERS=8
- CORDOVA_VERS=5
- PLATFORM=ios
- PLATFORM_VERS=10.3
- PACKAGE_EXT=zip
- CACHE_NAME=i10c5
- <<: *linux
android:
components:
- tools
- platform-tools
- android-25
- build-tools-25.0.2
env:
- NODE_VERS=8
- CORDOVA_VERS=6
- PLATFORM=android
- PLATFORM_VERS=6.0
- PACKAGE_EXT=apk
- CACHE_NAME=a6c6
- <<: *macosx
osx_image: xcode9.4
env:
- NODE_VERS=8
- CORDOVA_VERS=6
- PLATFORM=ios
- PLATFORM_VERS=10.3
- PACKAGE_EXT=zip
- CACHE_NAME=i10c6
- <<: *linux
android:
components:
- tools
- platform-tools
- android-26
- build-tools-26.0.2
env:
- NODE_VERS=10
- CORDOVA_VERS=7
- PLATFORM=android
- PLATFORM_VERS=7.1
- PACKAGE_EXT=apk
- CACHE_NAME=a7c7
- <<: *macosx
osx_image: xcode9.4
env:
- NODE_VERS=10
- CORDOVA_VERS=7
- PLATFORM=ios
- PLATFORM_VERS=11.3
- PACKAGE_EXT=zip
- CACHE_NAME=i11c7
- <<: *linux
android:
components:
- tools
- platform-tools
- android-27
- build-tools-27.0.3
env:
- NODE_VERS=10
- CORDOVA_VERS=8
- PLATFORM=android
- PLATFORM_VERS=8.1
- PACKAGE_EXT=apk
- CACHE_NAME=a8c8
- <<: *macosx
osx_image: xcode9.4
env:
- NODE_VERS=10
- CORDOVA_VERS=8
- PLATFORM=ios
- PLATFORM_VERS=12.2
- PACKAGE_EXT=zip
- CACHE_NAME=i12c8
- <<: *linux
android:
components:
- tools
- platform-tools
- android-28
- build-tools-28.0.3
env:
- NODE_VERS=12
- CORDOVA_VERS=9
- PLATFORM=android
- PLATFORM_VERS=9.0
- PACKAGE_EXT=apk
- CACHE_NAME=a9c9
- <<: *macosx
osx_image: xcode9.4
env:
- NODE_VERS=12
- CORDOVA_VERS=9
- PLATFORM=ios
- PLATFORM_VERS=12.2
- PACKAGE_EXT=zip
- CACHE_NAME=i12c9
exclude:
- env: PLATFORM=none
env:
global:
- ANTITAMPERING_TEST_DIR=$HOME/tests/hello
- IOS_BUILD_DIR=$ANTITAMPERING_TEST_DIR/platforms/ios/build/emulator
- SAUCE_CREDENTIALS=$SAUCE_USERNAME:$SAUCE_ACCESS_KEY
- SAUCE_HEADERS=Content-Type:application/octet-stream
- SAUCE_BASE_URL=https://saucelabs.com/rest/v1/storage/duddu/$TRAVIS_JOB_ID
matrix:
- PLATFORM=none
branches:
except:
- /^\d+\.\d+(\.\d+)?(-\S*)?$/
addons:
sauce_connect: true
cache:
directories:
- $HOME/.m2
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.android/build-cache
- node_modules
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -f $HOME/.gradle/caches/*/jarSnapshots/jarSnapshots.bin
- rm -f $HOME/.gradle/caches/*/jarSnapshots/jarSnapshots.lock
- rm -f $HOME/.gradle/caches/*/jarSnapshots/cache.properties*
- rm -f $HOME/.gradle/caches/*/fileHashes/fileHashes.bin
- rm -f $HOME/.gradle/caches/*/fileHashes/fileHashes.lock
- rm -f $HOME/.gradle/caches/*/classAnalysis/classAnalysis.bin
- rm -f $HOME/.gradle/caches/*/classAnalysis/classAnalysis.lock
- rm -f $HOME/.gradle/caches/*/classAnalysis/cache.properties*
- rm -rf $HOME/.gradle/caches/*/plugin-resolution/
before_install:
- nvm install $NODE_VERS
install:
- npm install -g npm@latest
- npm install -g cordova@$CORDOVA_VERS
- npm install
before_script:
- npm run lint
script:
- mkdir -p $ANTITAMPERING_TEST_DIR
- cordova create $ANTITAMPERING_TEST_DIR com.example.hello HelloWorld
- cd $ANTITAMPERING_TEST_DIR
- cordova platform add $PLATFORM --save
- cordova plugin add $TRAVIS_BUILD_DIR --variable ENABLE_CORDOVA_CALLBACK=true --save
- cordova plugin list
- cordova prepare -verbose
- cordova compile --debug $PLATFORM -verbose
- cd $TRAVIS_BUILD_DIR
- npm run tamper-$PLATFORM
- curl -u $SAUCE_CREDENTIALS -X POST -H $SAUCE_HEADERS
$SAUCE_BASE_URL-$PLATFORM.$PACKAGE_EXT?overwrite=true
--data-binary @$TRAVIS_BUILD_DIR/tests/$PLATFORM.$PACKAGE_EXT
- curl -u $SAUCE_CREDENTIALS -X POST -H $SAUCE_HEADERS
$SAUCE_BASE_URL-$PLATFORM-tamper.$PACKAGE_EXT?overwrite=true
--data-binary @$TRAVIS_BUILD_DIR/tests/$PLATFORM-tampered.$PACKAGE_EXT
- npm run appium-$PLATFORM