Skip to content

Commit

Permalink
Improve readme with usages
Browse files Browse the repository at this point in the history
  • Loading branch information
niltonvasques committed Oct 22, 2016
1 parent 83d1725 commit ed8cfa9
Showing 1 changed file with 20 additions and 21 deletions.
41 changes: 20 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,26 @@

### Usage

```bash
# Starting emulator
echo "no" | emulator64-arm -avd test -noaudio -no-window -gpu off -verbose -qemu -usbdevice tablet &
* Launch, wait and unlock the emulator

git clone https://github.com/niltonvasques/redux-android-sample.git
cd redux-android-sample
docker run --privileged -v /dev/kvm:/dev/kvm --rm niltonvasques/android-emulator:1.3 \
bash -c "start_emulator && wait_emulator && unlock_emulator"
* Using with drone.io CI

# Run unit tests
./gradlew check --daemon -PdisablePreDex --stacktrace

# Waiting for device be ready
adb wait-for-device
A=$(adb shell getprop sys.boot_completed | tr -d '\r')
while [ "$A" != "1" ]; do
sleep 2
A=$(adb shell getprop sys.boot_completed | tr -d '\r')
done

# Unlocking device
adb shell input keyevent 82

# Running instrumentation tests
./gradlew cC --daemon -PdisablePreDex --stacktrace
```yml
build:
image: niltonvasques/android-emulator:1.3
privileged: true
commands:
- cp -a /drone/.gradle /root/ && rm -Rf /drone/.gradle
- start_emulator && wait_emulator
- ./gradlew check --daemon -PdisablePreDex --stacktrace
- ./gradlew assembleDebugAndroidTest --daemon -PdisablePreDex --stacktrace
- unlock_emulator
- ./gradlew cC --daemon -PdisablePreDex --stacktrace
- cp -a /root/.gradle /drone/
cache:
mount:
- /drone/.gradle
```

0 comments on commit ed8cfa9

Please sign in to comment.