Skip to content

Conversation

wjaszczuk
Copy link
Contributor

This PR:

  • Upgrades BareExample app React Native version to 0.80.1
  • Introduces RNEF to BareExample app
  • Adds RNEF caching mechanisms for E2E tests
  • Splits E2E tests into two phases. In the first phase, it builds the artefact, and in the second one, it uses it to run e2e tests
  • Upgrade Maestro version to 1.41.0
  • Removes usage of --pure-lockfile due to deprecation warnings

This PR fixes #50

Copy link

changeset-bot bot commented Jul 16, 2025

⚠️ No Changeset found

Latest commit: d19a2c6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@wjaszczuk wjaszczuk force-pushed the 50-e2e-stability branch 2 times, most recently from 8192d6a to 1e0750b Compare July 16, 2025 12:17
@wjaszczuk wjaszczuk marked this pull request as ready for review July 16, 2025 13:39
@wjaszczuk
Copy link
Contributor Author

I added tap on Android because I noticed that API 33 uses an additional modal window on a fresh Chrome instance. That was the reason for the test failure on API 33.

run: yarn workspace react-native-legal-bare-example generate:legal
shell: bash

- name: "[WORKAROUND] run generateCodegenArtifactsFromSchema manually for example app"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this workaround done, because RNEF does not invoke codegen when building native part?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tested it with and without RNEF. I spent some time fighting this bug, and @artus9033 helped me with it. It started working with this script before the build. Without it, it breaks. The build. My plan was to commit it with a workaround and then try to fix this bug in a separate context.

hermesCommand = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsolutePath() + "/sdks/hermesc/%OS-BIN%/hermesc"
codegenDir = new File(["node", "--print", "require.resolve('@react-native/codegen/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsoluteFile()
cliFile = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim(), 'cli.js')
cliFile = file("../../node_modules/@rnef/cli/dist/src/bin.js")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we align to previous syntax that supports any nested location of cli script?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I followed the RNEF docs, but I agree with you. It should be in the same format as the other files above.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

FIxed

mavenCentral()
}
dependencies {
classpath("com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:11.6.3")
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this is line added by the generate command, let's remove it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Comment on lines 76 to 84
- name: Download and Unpack APK artifact
run: |
curl -L -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -o artifact.zip "https://api.github.com/repos/${{ github.repository }}/actions/artifacts/${{ needs.build-release.outputs.artifact-id }}/zip"
unzip artifact.zip -d downloaded-artifacts
tar zxf downloaded-artifacts/app.tar.gz -C downloaded-artifacts
ls -l downloaded-artifacts
APP_PATH=$(pwd)/$(find downloaded-artifacts -name "*.app" -print -quit)
echo "ARTIFACT_PATH_FOR_E2E=$APP_PATH" >> $GITHUB_ENV
shell: bash
Copy link

@szymonrybczak szymonrybczak Jul 19, 2025

Choose a reason for hiding this comment

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

instead of doing custom logic you can use remote-cache command from: callstackincubator/rock#263. i'm linking the PR because it's not documented yet.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great! I'll use it

@@ -0,0 +1,4 @@
//

Choose a reason for hiding this comment

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

not needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll remove it

@wjaszczuk wjaszczuk force-pushed the 50-e2e-stability branch 5 times, most recently from 812fd9a to 645ea85 Compare July 21, 2025 15:37
@wjaszczuk wjaszczuk marked this pull request as draft July 24, 2025 11:34
@wjaszczuk
Copy link
Contributor Author

I need some time to fix it. I convert it to draft

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GH Actions E2E tests runner instability
4 participants