forked from trynoice/android-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
109 lines (99 loc) · 5.42 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
os: linux
dist: bionic
arch: amd64
language: minimal
branches:
only:
- master
- /^\d+\.\d+\.x$/ # build patch branches. see CONTRIBUTING.md Releases section.
- /^\d+\.\d+\.\d+$/ # build tags
addons:
apt:
packages:
- wget
- unzip
- qemu-kvm
- libvirt-bin
- ubuntu-vm-builder
- bridge-utils
- openjdk-8-jdk
stages:
- name: test
- name: deploy
if: tag IS present
env:
global:
- COMPILE_SDK="29"
- BUILD_TOOLS="29.0.3"
- SDK_TOOLS_URL="https://dl.google.com/android/repository/commandlinetools-linux-6200805_latest.zip"
- JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64"
- ANDROID_HOME="$HOME/android-sdk"
- PATH="$JAVA_HOME/bin:$PATH"
- PATH="$ANDROID_HOME/emulator:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/tools:$PATH"
matrix:
- TEST_PLATFORM=android-22
- TEST_PLATFORM=android-23
- TEST_PLATFORM=android-25
- TEST_PLATFORM=android-27
- TEST_PLATFORM=android-28
- TEST_PLATFORM=android-29
before_install:
- sudo adduser $USER kvm
- sudo chown $USER /dev/kvm
- java -Xmx32m -version
- wget -qO tools.zip "$SDK_TOOLS_URL"
- unzip -d "$ANDROID_HOME" tools.zip
- rm tools.zip
install:
# see this https://stackoverflow.com/questions/60440509 to comprehend the '--sdk_root'
- echo y | sdkmanager --sdk_root="$ANDROID_HOME" "tools" > /dev/null
- echo y | sdkmanager "platform-tools" "emulator" "platforms;android-$COMPILE_SDK" "build-tools;$BUILD_TOOLS" > /dev/null
before_script:
- echo y | sdkmanager "system-images;$TEST_PLATFORM;default;x86" > /dev/null
- echo no | avdmanager create avd -f -n "$TEST_PLATFORM" -k "system-images;$TEST_PLATFORM;default;x86" -c 500M
- emulator -avd "$TEST_PLATFORM" -memory 4096 -no-boot-anim -no-audio -no-snapshot -no-window -camera-back none -camera-front none &
- >- # ensures that animations are disabled on the device and device is always awake.
adb wait-for-device shell '
while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;
settings put global window_animation_scale 0.0;
settings put global transition_animation_scale 0.0;
settings put global animator_duration_scale 0.0;
svc power stayon true;
input keyevent KEYCODE_WAKEUP;
'
script: ./gradlew connectedAndroidTest
after_success: bash <(curl -s https://codecov.io/bash)
_fastlane-config: &fastlane-config
env:
- secure: "Om5/jAc2a/paKPtYosO++UMi0gWC6F5BuHftxWMYaeYQbK3Y07r8K+OmvfzXq+rWtiiuK3fOaDjZGciI4zmx9U5cLgdfTFSUqqKkrvDeP9YgOJ5Etn5a0ody2IdfqHeuSOrr3FLnEna58IunMhicC/F8b5x6aRvksuHypU2YN4u5vaDILXIzIJfD9s7xW71h4+G+Z7EZNNvtbp9SakA/2uJMLJYeLdFyDOPuhDpgLnMW44cQQRPDHBANpcix3tml4eF1x5AuNHYvTbZkmvDsK4juHPD6kZn7yoXf0A5nOrF50/zxOqgHPtFtfAd0K7QkZqjx+80GfGj9P9RKRkikKWI8/OLekIyfuL/y373iqGyz0MnVlA5eIvz1FHBaG5boA11KmIvtpk3ElZLH2/KTQ3m7n7KarB9rAjh4H09/OzgrQeAA2Ep7pIO6zbubpT/b4mYqM8CAwJGE0IVCnABfgbH3K3xNiRYkkLHwJDQwzCU3sqOIOt+ePnZJo09s3TcyBIobyfSh/DguLKIv6VPirptWI+Kk+dCthaWw9FAoOMWh96b++qNWhzaYE4XTTN0V7Di34j/e6wJxRw0G8gZvZbRKGIRhee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eqivii6W7igt8wGs7U81JVbsXRZmvr55hvnRPrwW0+WlzmtqIlpcU04qVwOU1KkbawM3t/eS0e7qiXk1CK0rPRbAKfOGbrSagfvv/aTNovlN3G60emafPip+5TNYGFQOAA3LI59INp9QfUT7PcIe6bt8MlgE+JQRxHDjzGoZm74pjmj3Z09SVmxkrNhY/VzasWy87pAgtXuJaN/Z2W/XQ/2BS/O2UezrL5HV0UHP6mOeclb3lSEdm3x1vrH/3NRby6h01TQbh6jliPwzqvxUPH7lqJLO73H0WobclD/IQTkvobhf0UPsX4oWzQ+bLe/D19R2DL7o6twlvGpMhXsD90JYYM75bY9brMCQtgT4XX5Gwi/dtZeNY+fpNJcMfVo7NQ="
before_script:
- gem update --system
- gem install bundler
- bundle install
- openssl aes-256-cbc -K $encrypted_00dbe7dde1b1_key -iv $encrypted_00dbe7dde1b1_iv -in secrets.tar.enc -out secrets.tar -d
- tar xvf secrets.tar
after_script: rm keystore.jks service-account-key.json secrets.tar
after_success: skip # no coverage report after success
jobs:
fast_finish: true
allow_failures:
- env: TEST_PLATFORM=android-23
- env: TEST_PLATFORM=android-25
- env: TEST_PLATFORM=android-27
- env: TEST_PLATFORM=android-28
include:
- <<: *fastlane-config
stage: test
env:
# only here to indicate the jobs name, isn't used anywhere
- TEST_PLATFORM="fastlane-metadata"
install: skip
script: bundle exec fastlane validate
if: not env(TRAVIS_PULL_REQUEST) # because secrets are not available on fork branches
- <<: *fastlane-config
stage: deploy
script: bundle exec fastlane beta
notifications:
email: false