From 232d02c5f620fcf49fd5b0ed6c74386aea5ab58b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ramos?= Date: Sat, 9 Oct 2021 11:36:17 -0700 Subject: [PATCH] Move Docker test to GitHub Actions Summary: The test_docker_android job on Circle CI has a simple function: verify the base community RN Android image can be downloaded, and verify that we can use it to build a container with a compiled Android test app. Since the job is not strictly running a suite of tests, it can be moved to GitHub Actions. It will run on GitHub Actions as a Check on commits to main and pull requests. As building the test image requires the use of the base React Native Android image, we can skip downloading the base container and go straight to building the test image. Changelog: [Internal] Reviewed By: fkgozali Differential Revision: D31521978 fbshipit-source-id: ca8372a1464054e37f2da28a3ecfbc8f84db0408 --- .circleci/config.yml | 25 ----------------------- .github/workflows/test-docker-android.yml | 19 +++++++++++++++++ 2 files changed, 19 insertions(+), 25 deletions(-) create mode 100644 .github/workflows/test-docker-android.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index 4846fb669d3..b9f77a6ede7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -597,27 +597,6 @@ jobs: name: Build the template application command: cd template/android/ && ./gradlew assembleDebug - # ------------------------- - # JOBS: Test Docker - # ------------------------- - test_docker_android: - machine: - image: ubuntu-2004:202010-01 - steps: - - checkout - - run: - name: Configure Node - command: | - source ~/.bashrc - nvm i node - echo y | npx envinfo@latest - - run: - name: Pulls down the React Native Community Android Docker image - command: npm run docker-setup-android - - run: - name: Builds the Docker image with a compiled instance of the test app - command: npm run docker-build-android - # ------------------------- # JOBS: Windows # ------------------------- @@ -855,10 +834,6 @@ workflows: filters: branches: ignore: gh-pages - - test_docker_android: - filters: - branches: - ignore: gh-pages - test_windows: filters: branches: diff --git a/.github/workflows/test-docker-android.yml b/.github/workflows/test-docker-android.yml new file mode 100644 index 00000000000..8aec07427d4 --- /dev/null +++ b/.github/workflows/test-docker-android.yml @@ -0,0 +1,19 @@ +name: Test Docker Android Image +# This workflow is triggered on commits to main and pull requests. +on: + push: + branches: + - main + pull_request: + types: [ synchronize ] + branches: + - main + +jobs: + test-docker-android: + name: Test Docker + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Build Docker image with Android test app + run: npm run docker-build-android