From 2867d6679e2d3e792443568812aab7ed2c7a6dcb Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Tue, 11 Jun 2024 04:58:20 -0700 Subject: [PATCH] Fix test_android_template (#44871) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/44871 This re-enables and fix `test_android_template`. The problem was that we were invoking `yarn install` inside the template after we already installed with `npm install --registry`. So this was invalidating the Verdaccio setup and effectively fetching packages from NPM Changelog: [Internal] [Changed] - Fix test_android_template Reviewed By: cipolleschi Differential Revision: D58407941 fbshipit-source-id: 9b7b877cfc994eb8db1b5bf71dd35289c3937f5c --- .github/workflows/test-all.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test-all.yml b/.github/workflows/test-all.yml index 9484f304a8516f..2d87dd29e49e90 100644 --- a/.github/workflows/test-all.yml +++ b/.github/workflows/test-all.yml @@ -838,8 +838,6 @@ jobs: -H "Authorization: Bearer $REACT_NATIVE_BOT_GITHUB_TOKEN" \ -d "{\"event_type\": \"publish\", \"client_payload\": { \"version\": \"${{ github.ref_name }}\" }}" test_android_template: - # TODO: Re-enable once passing - if: ${{ github.event_name != 'pull_request' }} runs-on: ubuntu-latest needs: [prepare_hermes_workspace, build_npm_package] container: @@ -887,13 +885,7 @@ jobs: node ./scripts/releases/update-template-package.js "{\"react-native\":\"file:$GITHUB_WORKSPACE/build/$(cat build/react-native-package-version)\"}" node ./scripts/e2e/init-template-e2e.js --projectName $PROJECT_NAME --templatePath "$GITHUB_WORKSPACE/packages/react-native" --directory "/tmp/$PROJECT_NAME" --verbose - name: Setup gradle - uses: gradle/actions/setup-gradle@v3 - with: - gradle-version: 8.6 - - name: Yarn install in template project - run: | - cd /tmp/$PROJECT_NAME - yarn install --non-interactive + uses: ./.github/actions/setup-gradle - name: Build the template application for ${{ matrix.flavor }} with Architecture set to ${{ matrix.architecture }}, and using the ${{ matrix.jsengine }} JS engine. shell: bash run: | @@ -915,6 +907,7 @@ jobs: with: name: template-apk-${{ matrix.flavor }}-${{ matrix.architecture }}-${{ matrix.jsengine }} path: /tmp/AndroidTemplateProject/android/app/build/outputs/apk/ + compression-level: 0 test_ios_template_with_ruby_3_2_0: runs-on: macos-13 needs: [prepare_hermes_workspace, build_npm_package]