forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit '2781888d221ee80ebe3b4f308018e1997a3bb534' into 0.77-merge
- Loading branch information
Showing
1,563 changed files
with
104,117 additions
and
70,363 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: 🔍 Debugger - Bug Report | ||
description: Report a bug with React Native DevTools and the New Debugger | ||
labels: ["Needs: Triage :mag:", "Debugger"] | ||
|
||
body: | ||
- type: markdown | ||
attributes: | ||
value: "## Reporting a bug for React Native DevTools" | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Thank you for taking the time to report an issue for React Native DevTools, our new Debugger for React Native. | ||
Before you continue: | ||
* If you're using **Expo** and you're noticing a bug, [report it here](https://github.com/expo/expo/issues). | ||
* If you've found a problem with our **documentation**, [report it here](https://github.com/facebook/react-native-website/issues/). | ||
* If you're having an issue with **Metro** (the bundler), [report it here](https://github.com/facebook/metro/issues/). | ||
* If you're using an external library, report the issue to the **library first**. | ||
* Please [search for similar issues](https://github.com/facebook/react-native/issues) in our issue tracker. | ||
Make sure that your issue is tested against the [**latest stable**](https://github.com/facebook/react-native/releases/) of React Native. | ||
- type: textarea | ||
id: description | ||
attributes: | ||
label: Description | ||
description: A clear and concise description of what the bug is. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: reproduction | ||
attributes: | ||
label: Steps to reproduce | ||
description: The list of steps that reproduces the issue. | ||
placeholder: | | ||
1. Install the application with `yarn android` | ||
2. Press `j` to open the debugger | ||
3. Do something... | ||
validations: | ||
required: true | ||
- type: input | ||
id: version | ||
attributes: | ||
label: React Native Version | ||
description: The version of react-native that this issue reproduces on. Bear in mind that only issues on [supported versions](https://github.com/reactwg/react-native-releases#which-versions-are-currently-supported) will be looked into. | ||
placeholder: "0.76.0" | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: react-native-info | ||
attributes: | ||
label: Output of `npx react-native info` | ||
description: Run `npx react-native info` in your terminal, copy and paste the results here. | ||
placeholder: | | ||
Paste the output of `npx react-native info` here. The output looks like: | ||
... | ||
System: | ||
OS: macOS 14.1.1 | ||
CPU: (10) arm64 Apple M1 Max | ||
Memory: 417.81 MB / 64.00 GB | ||
Shell: | ||
version: "5.9" | ||
path: /bin/zsh | ||
Binaries: | ||
Node: ... | ||
version: 18.14.0 | ||
... | ||
render: text | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: extra | ||
attributes: | ||
label: Screenshots and Videos | ||
description: | | ||
Please provide screenshot or a video of your bug if relevant. | ||
Issues with videos and screenshots are more likely to **get prioritized**. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,15 @@ inputs: | |
required: false | ||
default: 'true' | ||
description: whether this action has to install java 17 or not | ||
flavor: | ||
required: true | ||
description: the flavor we want to run - either debug or release | ||
default: release | ||
working-directory: | ||
required: false | ||
default: "." | ||
description: The directory from which metro should be started | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
|
@@ -25,7 +34,7 @@ runs: | |
run: export MAESTRO_VERSION=1.36.0; curl -Ls "https://get.maestro.mobile.dev" | bash | ||
- name: Set up JDK 17 | ||
if: ${{ inputs.install-java == 'true' }} | ||
uses: actions/setup-java@v2 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: 'zulu' | ||
|
@@ -38,33 +47,38 @@ runs: | |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | ||
sudo udevadm control --reload-rules | ||
sudo udevadm trigger --name-match=kvm | ||
- name: Build Codegen | ||
shell: bash | ||
if: ${{ inputs.flavor == 'debug' }} | ||
run: ./packages/react-native-codegen/scripts/oss/build.sh | ||
- name: Run e2e tests | ||
uses: reactivecircus/android-emulator-runner@v2 | ||
with: | ||
api-level: 24 | ||
arch: x86 | ||
script: | | ||
echo "Install APK from ${{ inputs.app-path }}" | ||
adb install "${{ inputs.app-path }}" | ||
echo "Start recording to /sdcard/screen.mp4" | ||
adb shell screenrecord /sdcard/screen.mp4 | ||
echo "Start testing ${{ inputs.maestro-flow }}" | ||
$HOME/.maestro/bin/maestro test ${{ inputs.maestro-flow }} --format junit -e APP_ID=${{ inputs.app-id }} --debug-output /tmp/MaestroLogs | ||
echo "Stop recording. Saving to screen.mp4" | ||
adb pull /sdcard/screen.mp4 | ||
ram-size: '4096M' | ||
disk-size: '10G' | ||
disable-animations: false | ||
avd-name: e2e_emulator | ||
script: node .github/workflow-scripts/maestro-android.js ${{ inputs.app-path }} ${{ inputs.app-id }} ${{ inputs.maestro-flow }} ${{ inputs.flavor }} ${{ inputs.working-directory }} | ||
- name: Normalize APP_ID | ||
id: normalize-app-id | ||
shell: bash | ||
if: always() | ||
run: | | ||
NORM_APP_ID=$(echo "${{ inputs.app-id }}" | tr '.' '-') | ||
echo "app-id=$NORM_APP_ID" >> $GITHUB_OUTPUT | ||
- name: Store tests result | ||
uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: e2e_android_${{ inputs.app-id }}_report_${{ inputs.jsengine }} | ||
name: e2e_android_${{ steps.normalize-app-id.outputs.app-id }}_report_${{ inputs.jsengine }}_${{ inputs.flavor }} | ||
path: | | ||
report.xml | ||
screen.mp4 | ||
- name: Store Logs | ||
if: failure() && steps.run-tests.outcome == 'failure' | ||
uses: actions/[email protected] | ||
with: | ||
name: maestro-logs-android-${{ inputs.app-id }}-${{ inputs.jsengine }} | ||
name: maestro-logs-android-${{ steps.normalize-app-id.outputs.app-id }}-${{ inputs.jsengine }}-${{ inputs.flavor }} | ||
path: /tmp/MaestroLogs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,15 @@ inputs: | |
maestro-flow: | ||
required: true | ||
description: the folder that contains the maestro tests | ||
flavor: | ||
required: true | ||
description: Whether we are building for Debug or Release | ||
default: Release | ||
working-directory: | ||
required: false | ||
default: "." | ||
description: The directory from which metro should be started | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
|
@@ -29,6 +38,13 @@ runs: | |
with: | ||
java-version: '17' | ||
distribution: 'zulu' | ||
- name: Start Metro in Debug | ||
shell: bash | ||
if: ${{ inputs.flavor == 'Debug' }} | ||
run: | | ||
cd ${{ inputs.working-directory }} | ||
yarn start & | ||
sleep 5 # to give metro time to load | ||
- name: Run tests | ||
id: run-tests | ||
shell: bash | ||
|
@@ -53,18 +69,25 @@ runs: | |
echo "Launch the app" | ||
xcrun simctl launch $UDID ${{ inputs.app-id }} | ||
if [[ ${{ inputs.flavor }} == 'Debug' ]]; then | ||
# To give the app time to warm the metro's cache | ||
sleep 20 | ||
fi | ||
echo "Running tests with Maestro" | ||
export MAESTRO_DRIVER_STARTUP_TIMEOUT=1500000 # 25 min. CI is extremely slow | ||
# Add retries for flakyness | ||
MAX_ATTEMPTS=3 | ||
MAX_ATTEMPTS=5 | ||
CURR_ATTEMPT=0 | ||
RESULT=1 | ||
while [[ $CURR_ATTEMPT -lt $MAX_ATTEMPTS ]] && [[ $RESULT -ne 0 ]]; do | ||
CURR_ATTEMPT=$((CURR_ATTEMPT+1)) | ||
echo "Attempt number $CURR_ATTEMPT" | ||
echo "Start video record using pid: video_record_${{ inputs.jsengine }}_$CURR_ATTEMPT.pid" | ||
xcrun simctl io booted recordVideo video_record_$CURR_ATTEMPT.mov & echo $! > video_record_${{ inputs.jsengine }}_$CURR_ATTEMPT.pid | ||
|
@@ -82,15 +105,17 @@ runs: | |
if: always() | ||
uses: actions/[email protected] | ||
with: | ||
name: e2e_ios_${{ inputs.app-id }}_report_${{ inputs.jsengine }} | ||
name: e2e_ios_${{ inputs.app-id }}_report_${{ inputs.jsengine }}_${{ inputs.flavor }} | ||
path: | | ||
video_record_1.mov | ||
video_record_2.mov | ||
video_record_3.mov | ||
video_record_4.mov | ||
video_record_5.mov | ||
report.xml | ||
- name: Store Logs | ||
if: failure() && steps.run-tests.outcome == 'failure' | ||
uses: actions/[email protected] | ||
with: | ||
name: maestro-logs-${{ inputs.app-id }}-${{ inputs.jsengine }} | ||
name: maestro-logs-${{ inputs.app-id }}-${{ inputs.jsengine }}-${{ inputs.flavor }} | ||
path: /tmp/MaestroLogs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.