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
merged 4 commits into from Sep 20, 2018

Conversation

Projects
None yet
2 participants
@hypest
Contributor

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 changed the title from Rnmobile/have travis run mobile tests that use the parent code to Have travis run mobile tests that use the parent code Sep 19, 2018

@hypest hypest changed the title from Have travis run mobile tests that use the parent code to Have Travis run mobile tests that use the parent code Sep 19, 2018

@hypest hypest requested a review from aduth Sep 19, 2018

@hypest

This comment has been minimized.

Show comment
Hide comment
@hypest

hypest Sep 19, 2018

Contributor

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

Contributor

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 WordPress/gutenberg-core Sep 19, 2018

@hypest hypest merged commit b1d9fb7 into master Sep 20, 2018

2 checks passed

codecov/project 48.68% remains the same compared to 31497c2
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@hypest hypest deleted the rnmobile/have-travis-run-mobile-tests-that-use-the-parent-code branch Sep 20, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment