diff --git a/.circleci/config.yml b/.circleci/config.yml index b716020d93..7259fd6dca 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,8 +1,18 @@ version: 2.1 orbs: - gh: circleci/github-cli@2.0 + gh: circleci/github-cli@2.3.0 node: circleci/node@5.1.1 + android: circleci/android@2.4.0 + rn: react-native-community/react-native@7.1.1 + +commands: + e2e_build_android: + steps: + - android/restore-gradle-cache + - run: | + yarn e2e:build android.emu.debug + - android/save-gradle-cache parameters: version: @@ -28,6 +38,32 @@ parameters: default: "" jobs: + e2e_android: + executor: + name: rn/linux_android + resource_class: xlarge + steps: + - checkout + - node/install: + install-yarn: true + node-version: '18.18.2' + - rn/yarn_install + + # https://github.com/react-native-community/react-native-circleci-orb/issues/144#issuecomment-1073846571 + - android/create-avd: + avd-name: Pixel_API_29_AOSP + install: true + system-image: system-images;android-29;default;x86 + - android/start-emulator: + avd-name: Pixel_API_29_AOSP + no-window: true + post-emulator-launch-assemble-command: "" + + - e2e_build_android + - run: yarn e2e:test android.emu.debug + - store_artifacts: + path: artifacts + test_android_in_pr: docker: - image: cimg/android:2022.12 @@ -354,5 +390,4 @@ workflows: not: equal: [main, << pipeline.git.branch >>] jobs: - - test_android_in_pr - - test_ios_in_pr + - e2e_android