forked from attentiveness/reading
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
71 lines (70 loc) · 2.52 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
matrix:
include:
- os: osx
language: objective-c
sudo: false
osx_image: xcode8.2
env: TEST_TYPE=ios
- os: linux
language: android
sudo: required
jdk: oraclejdk8
env: TEST_TYPE=android
android:
components:
- tools
- build-tools-25.0.2
- android-25
- tools
- build-tools-23.0.1
- android-23
- extra-android-m2repository
- extra-android-support
- os: osx
language: node_js
sudo: false
node_js: 6
env: TEST_TYPE=js
env:
global:
- PROJECT_MOBILE=reading
addons:
code_climate:
repo_token: $CODE_CLIMATE_TOKEN
before_cache:
- rm -rf android/.gradle/caches
- rm -rf node_modules
cache:
directories:
- node_modules
- android/.gradle/caches
- android/.gradle/wrapper
before_install:
- if [[ $TRAVIS_PULL_REQUEST == 'false' ]]; then openssl aes-256-cbc -K $encrypted_549897007358_key -iv $encrypted_549897007358_iv
-in .travis/secrets.tar.enc -out secrets.tar -d ; fi
- if [[ $TRAVIS_PULL_REQUEST == 'false' ]]; then tar xvf secrets.tar ; fi
- if [[ $TEST_TYPE == 'android' ]] && [[ $TRAVIS_PULL_REQUEST == 'false' ]]; then mv gradle.properties android ; fi
- if [[ $TEST_TYPE == 'android' ]] && [[ $TRAVIS_PULL_REQUEST == 'false' ]]; then mv reading.keystore android/app ; fi
- if [[ $TEST_TYPE == 'android' ]]; then gem install fir-cli ; fi
install:
- curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.0/install.sh | bash
- source ~/.bashrc
- nvm install 6
- rm -Rf "${TMPDIR}/jest_preprocess_cache"
- npm config set spin=false
- npm config set progress=false
- travis_wait npm install
branches:
only:
- master
script:
- if [[ $TEST_TYPE == 'js' ]]; then npm run lint ; fi
- if [[ $TEST_TYPE == 'js' ]]; then npm test ; fi
- if [[ $TEST_TYPE == 'ios' ]]; then xcodebuild -project ios/$PROJECT_MOBILE.xcodeproj
-scheme $PROJECT_MOBILE -sdk iphonesimulator10.2 -configuration Debug CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO clean build ; fi
- if [ $TEST_TYPE == 'android' ] && [ $TRAVIS_PULL_REQUEST == 'false' ]; then cd android && ./gradlew clean && ./gradlew resguardRelease --stacktrace ; fi
- if [ $TEST_TYPE == 'android' ] && [ $TRAVIS_PULL_REQUEST != 'false' ]; then cd android && ./gradlew clean && ./gradlew assembleDebug --stacktrace ; fi
after_success:
- if [ $TEST_TYPE == 'android' ] && [ $TRAVIS_PULL_REQUEST == 'false' ]; then fir p
$HOME/build/attentiveness/reading/android/app/build/outputs/apk/AndResGuard_app-armeabi-v7a-release/app-armeabi-v7a-release_aligned_signed.apk
-T $FIR_TOKEN -c "$TRAVIS_TAG" ; fi