-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
executable file
·67 lines (56 loc) · 2.41 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
language: android
jdk: openjdk8
sudo: false
env:
global:
- ADB_INSTALL_TIMEOUT=5
- PATH=$PATH:$TRAVIS_BUILD_DIR/google-cloud-sdk/bin
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.android/build-cache
android:
components:
- tools
- platform-tools
- build-tools-27.0.3
- android-27
- extra-android-m2repository
- extra-google-m2repository
- extra-google-google_play_services
before_install:
- openssl aes-256-cbc -K $encrypted_fa08cc4ca265_key -iv $encrypted_fa08cc4ca265_iv -in ./app/distribution/release.keystore.enc -out ./app/distribution/release.keystore -d
- wget https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-127.0.0-linux-x86_64.tar.gz
- tar xf google-cloud-sdk-127.0.0-linux-x86_64.tar.gz
- echo "y" | ./google-cloud-sdk/bin/gcloud components update beta
- echo $PLAYSTORE_ACCOUNT_JSON >> app/distribution/key.json
- gcloud auth activate-service-account $GCLOUD_EMAIL --key-file app/distribution/key.json
- yes | sdkmanager "platforms;android-27"
- make set-licenses
- mkdir -p app/ && touch app/google-services.json
- echo $GOOGLE_SERVICES_JSON >> app/google-services.json
- bundle install
- bundle update
install:
- gcloud config set project $FIREBASE_PROJECT
script:
- make build-ci
- make static-check
- make assemble-android-test
- ./google-cloud-sdk/bin/gcloud beta firebase test android run --type instrumentation --app ./app/build/outputs/apk/debug/app-debug.apk --test ./app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk --device model=Nexus6,version=21,locale=en,orientation=portrait --directories-to-pull /sdcard --environment-variables coverage=true,coverageFile="/sdcard/coverage.ec" --results-dir $TRAVIS_BUILD_NUMBER --no-record-video
- mkdir -p firebase
- gsutil -m cp -r -U "`gsutil ls gs://test-lab-4vup0p5qp17aw-w1y8vwf6x7mvq/$TRAVIS_BUILD_NUMBER/Nexus6-21-en-portrait | tail -1`*" $TRAVIS_BUILD_DIR/firebase/
- mkdir -p app/build/outputs/code-coverage/connected && cp $TRAVIS_BUILD_DIR/firebase/coverage.ec app/build/outputs/code-coverage/connected/coverage.ec
- ./gradlew jacocoTestReport
after_success:
- make sonar
deploy:
provider: script
script: bundle exec fastlane playstore
skip_cleanup: true
on:
branch: master