forked from wordpress-mobile/AztecEditor-Android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
40 lines (36 loc) · 1.47 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
language: android
jdk: oraclejdk8
sudo: required
android:
components:
- extra-android-m2repository
- extra-android-support
- extra-google-m2repository
- platform-tools
- tools
- build-tools-27.0.3
- android-27
env:
global:
- MALLOC_ARENA_MAX=2
- GRADLE_OPTS="-XX:MaxPermSize=4g -Xmx4g"
- ANDROID_SDKS=android-16
- ANDROID_TARGET=android-16
before_install:
# Decrypt secret.json (firebase access)
- openssl aes-256-cbc -K $encrypted_3480988b28c1_key -iv $encrypted_3480988b28c1_iv -in .firebase.secrets.json.enc -out .firebase.secrets.json -d
script:
# Build
- ./gradlew assemble assembleAndroidTest
# Run unit tests
- ./gradlew test
# Android lint
- ./gradlew lint
# Kotlin lint and checkstyle
- ./gradlew ktlint
# Download and setup gcloud
- wget https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-185.0.0-linux-x86_64.tar.gz
- tar xf google-cloud-sdk-185.0.0-linux-x86_64.tar.gz
- ./google-cloud-sdk/bin/gcloud auth activate-service-account --key-file .firebase.secrets.json
# Run connected tests
- ./google-cloud-sdk/bin/gcloud 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=Nexus5X,version=26,locale=en,orientation=portrait --project api-project-108380595987 --timeout 10m --verbosity info & while kill -0 $! 2> /dev/null; do echo -n .; sleep 10; done