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
0cc6c5cf
Commit
0cc6c5cf
authored
Sep 26, 2017
by
Bruno Agrizzi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
saeedmasoumi image
parent
61b77629
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
42 deletions
+33
-42
.gitlab-ci.yml
.gitlab-ci.yml
+33
-42
No files found.
.gitlab-ci.yml
View file @
0cc6c5cf
image
:
51systems/gitlab-ci-android:latest
before_script
:
-
export GRADLE_USER_HOME=/cache/.gradle
image
:
saeedmasoumi/gitlab-ci-android:latest
stages
:
-
build
-
test
build:debug
:
tags
:
-
android
stage
:
build
script
:
-
bash ./gradlew assembleDebug
artifacts
:
expire_in
:
1 days
paths
:
-
"
**/build/outputs/**/*.apk"
-
"
**/build/outputs/**/*.aar"
before_script
:
-
export GRADLE_USER_HOME=`pwd`/.gradle
-
mkdir -p $GRADLE_USER_HOME
-
chmod +x ./gradlew
build:release
:
tags
:
-
android
stage
:
build
script
:
-
bash ./gradlew assemble
artifacts
:
expire_in
:
1 days
paths
:
-
"
**/build/outputs/**/*.apk"
-
"
**/build/outputs/**/*.aar"
cache
:
paths
:
-
.gradle/wrapper
-
.gradle/caches
test:unit
:
build
:
tags
:
-
android
stage
:
test
-
android
stage
:
build
script
:
-
bash ./gradlew test
-
./gradlew assembleDebug
-
./gradlew assembleDebugAndroidTest
artifacts
:
name
:
"
Tests-${CI_BUILD_NAME}_${CI_BUILD_REF_NAME}_${CI_BUILD_REF}"
when
:
always
expire_in
:
1 weeks
paths
:
-
"
**/build/reports/tests"
-
app/build/outputs/
test:
instrumentation:21
:
test
:
tags
:
-
android
-
android
stage
:
test
image
:
51systems/gitlab-ci-android-emulator-21
script
:
-
android-run-emulator nexus5_21 bash ./gradlew connectedAndroidTest
-
echo "no" | /sdk/tools/android create avd -f -n test -t android-23 --abi "google_apis/x86" -s WXGA720
-
echo "no" | /sdk/tools/emulator64-x86 -avd test -wipe-data -noaudio -no-window -gpu off -verbose -qemu -usbdevice tablet -vnc :2 &
-
/helpers/wait-for-avd-boot.sh
-
/sdk/platform-tools/adb install -r app/build/outputs/apk/app-debug.apk
-
/sdk/platform-tools/adb install -r app/build/outputs/apk/app-debug-androidTest-unaligned.apk
-
/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
:
name
:
"
Tests-Instrumentation-21-${CI_BUILD_NAME}_${CI_BUILD_REF_NAME}_${CI_BUILD_REF}"
when
:
always
expire_in
:
1 weeks
paths
:
-
"
**/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