This commit is contained in:
Anant Bhasin 2021-08-04 15:59:58 +05:30
parent 7831728b16
commit edcc665a29
1 changed files with 68 additions and 0 deletions

View File

@ -153,6 +153,9 @@ commands:
if [[ $CIRCLE_JOB == "android-build-experimental" ]]; then if [[ $CIRCLE_JOB == "android-build-experimental" ]]; then
./gradlew bundleExperimentalPlayRelease ./gradlew bundleExperimentalPlayRelease
fi fi
if [[ $CIRCLE_JOB == "android-build-e2e" ]]; then
./gradlew app:assembleE2ePlayRelease app:assembleE2ePlayReleaseAndroidTest -DtestBuildType=release
fi
if [[ ! $KEYSTORE ]]; then if [[ ! $KEYSTORE ]]; then
./gradlew assembleExperimentalPlayDebug ./gradlew assembleExperimentalPlayDebug
fi fi
@ -190,6 +193,36 @@ commands:
paths: paths:
- android/app/build/outputs - android/app/build/outputs
android-e2e-test:
description: "End-to-End testing for Android using detox"
steps:
- checkout
- node/install:
install-yarn: true
- restore_cache: *restore-npm-cache-linux
- run: *install-npm-modules
- run:
name: Create avd
command: |
SYSTEM_IMAGES="system-images;android-28;default;x86"
sdkmanager "$SYSTEM_IMAGES"
echo "no" | avdmanager --verbose create avd -n "PIXEL_API_28_AOSP" -k "$SYSTEM_IMAGES" -d "pixel"
- run:
name: Launch emulator
command: |
emulator -avd "PIXEL_API_28_AOSP" -delay-adb -verbose -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim
background: true
- run:
name: Run the test
command: |
yarn detox test -c and.emu.release --cleanup
ios-build: ios-build:
description: "Build iOS app" description: "Build iOS app"
steps: steps:
@ -326,6 +359,8 @@ commands:
- save_cache: *save-gems-cache - save_cache: *save-gems-cache
version: 2.1 version: 2.1
orbs:
node: circleci/node@4.6.0
# EXECUTORS # EXECUTORS
executors: executors:
@ -389,6 +424,27 @@ jobs:
steps: steps:
- android-build - android-build
android-build-e2e:
<<: *defaults
docker:
- image: circleci/android:api-29-node
environment:
<<: *android-env
<<: *bash-env
steps:
- android-build
android-e2e-test:
<<: *defaults
machine:
image: android:202102-01
resource_class: large
environment:
<<: *android-env
<<: *bash-env
steps:
- android-e2e-test
android-internal-app-sharing-experimental: android-internal-app-sharing-experimental:
<<: *defaults <<: *defaults
docker: docker:
@ -519,3 +575,15 @@ workflows:
- android-google-play-beta-official: - android-google-play-beta-official:
requires: requires:
- android-hold-google-play-beta-official - android-hold-google-play-beta-official
# Aandroid E2E Testing
- android-hold-e2e:
type: approval
requires:
- lint-testunit
- android-build-e2e:
requires:
- android-hold-e2e
- android-e2e-test:
requires:
- android-build-e2e