Skip to content

Commit

Permalink
Move test-docker-android from GH Actions to CircleCI (#36093)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #36093

The Test Docker Android job is flaky as sometimes fetching artifacts from remote
returns different hashes.
I'm moving the job to CircleCI (so it's faster) + I'm using the `buck_fetch.sh`
script we already have which has a retry logic.

Changelog:
[Internal] [Changed] - Move test-docker-android from GH Actions to CircleCI

Reviewed By: javache

Differential Revision: D43121477

fbshipit-source-id: 1df114fd3ad9445a4a5dc7834bf811c3476322cd
  • Loading branch information
cortinico authored and facebook-github-bot committed Feb 8, 2023
1 parent 69f11cb commit 9eaf6f5
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 36 deletions.
10 changes: 2 additions & 8 deletions .circleci/Dockerfiles/Dockerfile.android
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,11 @@ ADD React /app/React
ADD keystores /app/keystores
ADD packages/react-native-codegen /app/packages/react-native-codegen
ADD tools /app/tools
add scripts /app/scripts
ADD scripts /app/scripts

WORKDIR /app

RUN scripts/download-kotlin-compiler-with-buck.sh

RUN buck fetch ReactAndroid/src/test/java/com/facebook/react/modules
RUN buck fetch ReactAndroid/src/main/java/com/facebook/react
RUN buck fetch ReactAndroid/src/main/java/com/facebook/react/shell
RUN buck fetch ReactAndroid/src/test/...
RUN buck fetch ReactAndroid/src/androidTest/...
RUN scripts/buck/buck_fetch.sh

RUN buck build ReactAndroid/src/main/java/com/facebook/react
RUN buck build ReactAndroid/src/main/java/com/facebook/react/shell
Expand Down
15 changes: 14 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ jobs:

- run:
name: Download Dependencies Using Buck
command: ./scripts/circleci/buck_fetch.sh
command: ./scripts/buck/buck_fetch.sh

- run:
name: Build & Test React Native using Buck
Expand Down Expand Up @@ -754,6 +754,18 @@ jobs:
- run_e2e:
platform: android

# -------------------------
# JOBS: Test Android Docker Image
# -------------------------
test_android_docker_image:
machine:
image: ubuntu-2004:202010-01
steps:
- checkout
- run:
name: Try to build React Native inside the Docker Container
command: npm run docker-build-android

# -------------------------
# JOBS: Test Android Template
# -------------------------
Expand Down Expand Up @@ -1603,6 +1615,7 @@ workflows:
run_disabled_tests: false
- test_android:
run_disabled_tests: false
- test_android_docker_image
- test_android_template:
requires:
- build_npm_package
Expand Down
26 changes: 0 additions & 26 deletions .github/workflows/test-docker-android.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function retry {

CURRENT_DIR=$(pwd)
export KOTLIN_HOME="$CURRENT_DIR/third-party/kotlin"
retry 3 scripts/download-kotlin-compiler-with-buck.sh
retry 3 scripts/buck/download-kotlin-compiler-with-buck.sh

retry 3 buck fetch ReactAndroid/src/test/java/com/facebook/react/modules
retry 3 buck fetch ReactAndroid/src/main/java/com/facebook/react
Expand Down

0 comments on commit 9eaf6f5

Please sign in to comment.