提交 8ffe0538 编写于 作者: S Sam Judd

Run emulator tests on travis.

Also parallelizes the build a bit so that samples, the library, and the
emulator tests are built and run independently.
上级 efa61f0d
language: android
sudo: required
dist: trusty
android:
components:
- tools
- platform-tools
- tools
- build-tools-26.0.1
- android-26
- android-22
- sys-img-armeabi-v7a-android-22
licenses:
licenses:
- 'android-sdk-license.*'
jdk:
- oraclejdk8
sudo: false
env:
matrix:
- COMPONENT=unit
- COMPONENT=instrumentation
- COMPONENT=samples
before_script:
- ./scripts/travis_before_script.sh
script: 'travis_retry ./gradlew build --parallel'
script:
- ./scripts/travis_script.sh
after_success:
- scripts/travis-sonatype-publish.sh
- ./gradlew jacocoTestReport coveralls
- ./scripts/travis_after_success.sh
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
......
#!/usr/bin/env bash
set -e
if [ "$COMPONENT" == "unit" ]; then
./scripts/travis_sonatype_publish.sh
./gradlew jacocoTestReport coveralls
fi
#!/usr/bin/env bash
set -e
if [ "$COMPONENT" == "instrumentation" ]; then
echo "Starting emulator for $COMPONENT tests"
./scripts/travis_create_emulator.sh &
fi
#!/usr/bin/env bash
set -e
echo no | android create avd --force -n test -t android-22 --abi armeabi-v7a
QEMU_AUDIO_DRV=none emulator -engine classic -avd test -no-window &
exit 0
#!/usr/bin/env bash
set -e
./gradlew :library:assembleDebug :library:assembleDebugAndroidTest --parallel
echo "Waiting for emulator..."
android-wait-for-emulator
./gradlew :library:connectedCheck
#!/usr/bin/env bash
set -e
./gradlew :samples:flickr:build \
:samples:giphy:build \
:samples:contacturi:build \
:samples:gallery:build \
:samples:imgur:build \
:samples:svg:build \
--parallel
#!/usr/bin/env bash
set -e
if [ "$COMPONENT" == "unit" ]; then
./scripts/travis_unit.sh
elif [ "$COMPONENT" == "instrumentation" ]; then
./scripts/travis_instrumentation.sh
elif [ "$COMPONENT" == "samples" ]; then
./scripts/travis_samples.sh
else
echo "Unrecognized component: $COMPONENT"
exit 1
fi
#!/usr/bin/env bash
set -e
./gradlew build \
-x :samples:flickr:build \
-x :samples:giphy:build \
-x :samples:contacturi:build \
-x :samples:gallery:build \
-x :samples:imgur:build \
-x :samples:svg:build \
-x testReleaseUnitTest --parallel
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册