diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index cf3812ef..874c2e15 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -1,83 +1,15 @@ version: v1.0 -name: Verification Pipeline +name: Android agent: machine: type: e1-standard-2 os_image: ubuntu1804 - containers: - - name: main - image: 'registry.semaphoreci.com/android:29' - -auto_cancel: - running: - when: "true" - -global_job_config: - env_vars: - - name: ADB_INSTALL_TIMEOUT - value: "10" - secrets: - - name: android_keys - prologue: - commands: - - checkout - - mv ~/release-keystore.jks ~/$SEMAPHORE_GIT_DIR/app/release-keystore.jks - - cache restore gradle-wrapper - - cache restore gradle-cache - - cache restore android-build - blocks: - - name: 'Build' - skip: - when: "(branch != 'master' OR branch != 'dev') AND pull_request !~ '.*'" + - name: Gradle task: jobs: - - name: 'Build Project' + - name: Build commands: - - ./gradlew bundle - epilogue: - on_pass: - commands: - - cache clear - - cache store gradle-wrapper ~/.gradle/wrapper - - cache store gradle-cache ~/.gradle/caches - - cache store android-build ~/.android/build-cache - - - name: 'Verification' - skip: - when: "pull_request !~ '.*'" - task: - jobs: - - name: 'Analyze Code' - commands: - - ./gradlew lint - - name: 'Unit Tests' - commands: - - ./gradlew test - - name: 'Integration Tests' - commands: - - sdkmanager "platform-tools" "platforms;android-29" "build-tools;30.0.0" "emulator" - - sdkmanager "system-images;android-29;google_apis;x86" - - echo no | avdmanager create avd -n test-emulator -k "system-images;android-29;google_apis;x86" - - emulator -avd test-emulator -noaudio -no-boot-anim -gpu off -no-window & - - adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;' - - adb shell wm dismiss-keyguard - - sleep 1 - - adb shell settings put global window_animation_scale 0 - - adb shell settings put global transition_animation_scale 0 - - adb shell settings put global animator_duration_scale 0 - - ./gradlew connectedAndroidTest - epilogue: - always: - commands: - - artifact push job --expire-in 2w --destination reports/ app/build/reports/ - -promotions: - - name: Internal Deploy - pipeline_file: deploy-internal.yml - auto_promote: - when: "result = 'passed' AND branch = 'dev'" - - name: Beta Deploy - pipeline_file: deploy-beta.yml - auto_promote: - when: "result = 'passed' AND branch = 'master'" + - checkout + - sem-version java 1.8 + - ./gradlew build diff --git a/semaphore-demo-android-1.0.tar.gz b/semaphore-demo-android-1.0.tar.gz new file mode 100644 index 00000000..b2673915 Binary files /dev/null and b/semaphore-demo-android-1.0.tar.gz differ