mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/47506 The Check nightlies job prepare a new nightly app with additional libraries and on iOS it builds with `yarn ios`. The command tries to launch the app on the simulator which sometimes fails and this can make the jobs keep running for hours. This change make sure that we only build the app ## Changelog: [Internal] - Only build iOS in CI for Check Nightlies Reviewed By: blakef Differential Revision: D65656812 fbshipit-source-id: 14db3738f33f8024c9e99fe206b170209154bac7
47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
name: test-library-on-nightly
|
|
description: Tests a library on a nightly
|
|
inputs:
|
|
library-npm-package:
|
|
description: The library npm package to add
|
|
required: true
|
|
platform:
|
|
description: whether we want to build for iOS or Android
|
|
required: true
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Create new app
|
|
shell: bash
|
|
run: |
|
|
cd /tmp
|
|
npx @react-native-community/cli init RNApp --skip-install --version nightly
|
|
- name: Add library
|
|
shell: bash
|
|
run: |
|
|
cd /tmp/RNApp
|
|
yarn add ${{ inputs.library-npm-package }}
|
|
|
|
- name: Build iOS
|
|
shell: bash
|
|
if: ${{ inputs.platform == 'ios' }}
|
|
run: |
|
|
cd /tmp/RNApp/ios
|
|
bundle install
|
|
bundle exec pod install
|
|
xcodebuild build \
|
|
-workspace RNApp.xcworkspace \
|
|
-scheme RNApp \
|
|
-sdk iphonesimulator
|
|
- name: Setup Java for Android
|
|
if: ${{ inputs.platform == 'android' }}
|
|
uses: actions/setup-java@v2
|
|
with:
|
|
java-version: '17'
|
|
distribution: 'zulu'
|
|
- name: Build Android
|
|
shell: bash
|
|
if: ${{ inputs.platform == 'android' }}
|
|
run: |
|
|
cd /tmp/RNApp/android
|
|
./gradlew assembleDebug
|