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

Improve install tests (setting newArchEnabled and hermesEnabled correctly on Android) #5375

Merged
merged 6 commits into from
Feb 7, 2023

Conversation

kraenhansen
Copy link
Member

@kraenhansen kraenhansen commented Feb 6, 2023

What, How & Why?

We had a bug in the way the install tests configured the Android test to run with Hermes disabled.
Also, we now test throwing in code called from C++, because that has historically been (and is currently) broken (because of facebook/react-native#36052).

This also makes it so PRs updating the install test workflow won't post and spam the team channel anymore.

@kraenhansen kraenhansen self-assigned this Feb 6, 2023
@cla-bot cla-bot bot added the cla: yes label Feb 6, 2023
Comment on lines +191 to +198
const localPropertiesContent =
"\n# Install test overwrites below\n\n" +
Object.entries(localProperties)
.map(([k, v]) => `${k}=${v}`)
.join("\n");

console.log(`Writing local.properties to ${localPropertiesPath}`);
fs.writeFileSync(localPropertiesPath, localPropertiesContent);
console.log(`Appending gradle properties to ${localPropertiesPath}`);
fs.appendFileSync(localPropertiesPath, localPropertiesContent);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes configuring hermes and new architecture on Android.

@@ -18,6 +18,7 @@ defaults:

jobs:
install:
name: Install Test on React Native ${{ matrix.platform == 'ios' && 'iOS' || 'Android' }} realm@${{ matrix.realm-version }}, react-native@${{ matrix.react-native-version }} new architecture ${{ matrix.new-architecture && 'enabled' || 'disabled' }} running ${{ matrix.engine }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making the name of the job a bit more readable:

Screenshot 2023-02-06 at 13 17 36

@kraenhansen kraenhansen changed the title Improve install tests Improve install tests (setting newArchEnabled and hermesEnabled correctly on Android) Feb 6, 2023
// Read the persons out of the database again
const message =
"Persons are " +
realm
.objects("Person")
.map((p) => p.name)
.join(", ");
.join(", ") +
suffix;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If i'm understanding this right, this will output a "!" when successful? Is that meaningful?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that meaningful?

Not really 🙂 I just need some string to round-trip and expect.

Copy link
Contributor

@takameyer takameyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! LGTM

@kraenhansen kraenhansen merged commit 03ed46d into master Feb 7, 2023
@kraenhansen kraenhansen deleted the kh/fail-install-test branch February 7, 2023 15:00
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants