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

Have Travis run mobile tests that use the parent code #10034

Merged

Conversation

hypest
Copy link
Contributor

@hypest hypest commented Sep 19, 2018

Description

Until now, Travis was running the mobile tests but those were actually using the deeply nested Gutenberg filetree (a nested submodule inside the mobile submodule), resulting to false positive "green" runs.

This PR adds a flag to the mobile related Travis jobs to make them use the proper configuration where the mobile tests should assume to be running from inside the Gutenberg folder.

How has this been tested?

This is a Travis change and the testing is done by looking at the Travis run on this PR.
In particular, when looking at the 2 mobile job outputs, one can see this:

$ ./.travis/travis-checks-js.sh
> gutenberg-mobile@0.1.0 test:inside-gb /home/travis/build/WordPress/gutenberg/gutenberg-mobile
> cross-env NODE_ENV=test node node_modules/jest/bin/jest.js --verbose --config jest_gb.config.js

where the important bit is the jest_gb.config.js. That's the Jest configuration that sets the Gutenberg package paths to point one directory up from the mobile submodule. That's what we need to have the mobile tests use the code/changes found in the parent folder.

Types of changes

Adds a shell flag to the Travis configuration of the mobile jobs.

To test:

Open the Travis output https://travis-ci.org/WordPress/gutenberg/jobs/430595120#L5410 and notice the jest_gb.config.js bit.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.

@hypest hypest added [Status] In Progress Tracking issues with work in progress [Type] Build Tooling Issues or PRs related to build tooling Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) labels Sep 19, 2018
@hypest hypest changed the title Rnmobile/have travis run mobile tests that use the parent code Have travis run mobile tests that use the parent code Sep 19, 2018
@hypest hypest changed the title Have travis run mobile tests that use the parent code Have Travis run mobile tests that use the parent code Sep 19, 2018
@hypest hypest requested a review from aduth September 19, 2018 15:26
@hypest
Copy link
Contributor Author

hypest commented Sep 19, 2018

Headsup , the 2 Travis mobile jobs failing right now beacuse current Gutenberg master (32a9c1a at the time of writing) has npm test failing on the mobile tests.

Edit: fixed with fb8cc59

@hypest hypest requested a review from a team September 19, 2018 17:26
@hypest hypest merged commit b1d9fb7 into master Sep 20, 2018
@hypest hypest deleted the rnmobile/have-travis-run-mobile-tests-that-use-the-parent-code branch September 20, 2018 11:25
hypest added a commit that referenced this pull request Oct 31, 2018
aduth pushed a commit that referenced this pull request Oct 31, 2018
* Revert "Have Travis run mobile tests that use the parent code (#10034)"

This reverts commit b1d9fb7.

* Revert "Integrate the mobile React Native testsuite with the main Gutenberg build (#9883)"

This reverts commit cb908cf.
@hypest hypest removed the [Status] In Progress Tracking issues with work in progress label Jul 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Type] Build Tooling Issues or PRs related to build tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants