Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update testing instructions for the script that downloads artifacts from CircleCI #3795

Merged
merged 3 commits into from
Aug 8, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion website/contributing/release-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ Currently, this flow can only be done on macOS machines.

:::

- One CircleCI personal API token - see [here](https://circleci.com/docs/managing-api-tokens#creating-a-personal-api-token) how to set one.
- Have a clone of `react-native` repo and be on the release branch (`0.XX-stable`).

```bash
# Checkout relevant branch
git checkout 0.66-stable
git checkout 0.72-stable

# Optional: you might need a .watchmanconfig because `npm start` would fail without it.
echo '{}' > .watchmanconfig
Expand Down Expand Up @@ -74,8 +75,21 @@ Followed by the wanted options:
-t, --target [choices: "RNTester", "RNTestProject"] [default: "RNTester"]
-p, --platform [choices: "iOS", "Android"] [default: "iOS"]
-h, --hermes [boolean] [default: true]
-c, --circleciToken [string]
```

Using the `-c <your-token>` option is recommended, as the script will download the required artifacts from CircleCI, instead of having to build from source reducing the testing time
cipolleschi marked this conversation as resolved.
Show resolved Hide resolved
There are a couple of extra requirements to make this flow work:
1. the CI must have run at least once in the current branch. We need to download artifacts generated by CircleCI, so we need to have at least one run of the CI.
cipolleschi marked this conversation as resolved.
Show resolved Hide resolved
2. The relevant jobs must have been finished. The required jobs depends on the task you are about to tests:
- if you are testing RNTester on iOS, it has to download Hermes for iOS. So the job that produces it must have finished successfully
- if you are testing RNTester on Android, it has to download the right APK (JSC or Hermes). So the job that produces the APKs must have finished successfully.
- if you are testing RNTestProject, it has to download the maven prebuilts and the Hermes engine for iOS. So the jobs that produce those artifacts must have finished successfully.

Anyway, if any of those prerequisites is not met, the script should output a proper error message.

If you need to build React Native from source, you can skip the `-c` parameter. By not passing the CircleCI token, the script falls back to the previous flow, building everything locally.

#### Versions older than 71

You need to use the interactive script run you through the different variants in [Test Dimensions](#test-dimensions):
Expand Down