Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gitlab-ci-android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Bruno Agrizzi
gitlab-ci-android
Commits
d0b1d885
Commit
d0b1d885
authored
Sep 25, 2017
by
Bruno Agrizzi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Novo YML e nova imagem
parent
925fa3a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
34 deletions
+31
-34
.gitlab-ci.yml
.gitlab-ci.yml
+31
-34
No files found.
.gitlab-ci.yml
View file @
d0b1d885
image
:
evologica/android-sdk:latest
image
:
jerbob92/gitlab-ci-android:latest
variables
:
ADB_INSTALL_TIMEOUT
:
"
5000"
before_script
:
-
chmod +x ./gradlew
stages
:
stages
:
-
build
-
build
-
test
-
test
before_script
:
-
export GRADLE_USER_HOME=`pwd`/.gradle
-
mkdir -p $GRADLE_USER_HOME
-
chmod +x ./gradlew
cache
:
paths
:
-
.gradle/wrapper
-
.gradle/caches
build
:
build
:
tags
:
-
android
only
:
-
master
stage
:
build
stage
:
build
script
:
script
:
-
./gradlew assembleDebug
-
./gradlew assembleDebug
-
./gradlew assembleDebugAndroidTest
artifacts
:
artifacts
:
paths
:
paths
:
-
app/build/outputs/
-
app/build/outputs/
unitTests
:
tags
:
-
android
only
:
-
master
stage
:
test
script
:
-
./gradlew test
functionalTests
:
test
:
tags
:
-
android
only
:
-
master
stage
:
test
stage
:
test
script
:
script
:
-
echo no | $ANDROID_HOME/tools/bin/avdmanager create avd --name test --package "system-images;android-23;google_apis;armeabi-v7a"
-
echo "no" | /sdk/tools/android create avd -f -n test -t android-23 --abi "google_apis/x86" -s WXGA720
-
$ANDROID_HOME/tools/emulator -avd test -no-window -no-audio -no-boot-anim &
-
echo "no" | /sdk/tools/emulator64-x86 -avd test -wipe-data -noaudio -no-window -gpu off -verbose -qemu -usbdevice tablet -vnc :2 &
-
while [ "$ANDROID_HOME/platform-tools/adb shell getprop init.svc.bootanim" ] ; do sleep 1; done
-
/helpers/wait-for-avd-boot.sh
-
$ANDROID_HOME/platform-tools/adb shell input keyevent 82
-
/sdk/platform-tools/adb install -r app/build/outputs/apk/app-debug.apk
-
$ANDROID_HOME/platform-tools/adb devices
-
/sdk/platform-tools/adb install -r app/build/outputs/apk/app-debug-androidTest-unaligned.apk
-
./gradlew cAT
-
/sdk/platform-tools/adb shell pm grant [package-name] android.permission.SET_ANIMATION_SCALE
-
flvrec.py -o test.flv localhost 5902 &
-
/sdk/platform-tools/adb shell am instrument -w -r -e debug
false
[package-name]/[test-class] | tee test.log
-
pkill -f flvrec
-
yamdi -i test.flv -o test_recording.flv
-
rm test.flv
-
if grep -q "FAILURES!!!" test.log; then exit 1; fi
artifacts
:
artifacts
:
paths
:
paths
:
-
app/build/reports/androidTests/
-
test_recording.flv
-
test.log
when
:
on_failure
expire_in
:
1 week
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment