Summary:
We opt in to version ^5 of the React Native Babel Preset, as required after the bump to Babel 7. This fixes the Objective-C end-to-end test failure in master. (Fixes#19538)
See 34bd776af2 (commitcomment-29024085) for prior discussion.
There have already been several changes made to the repo during the transition to Babel 7. This PR brings all tests back to green and allows us to move forward with the 0.56 branch cut.
We also bump our tests to use Xcode 9.4.0 and iOS 11.4, the latest stable versions of both.
Once the 0.56 branch makes it to stable, we can change `react-native-babel-preset@latest` on npm to point to `react-native-babel-preset@5.0.1` (or newer), and undo the change made to `init.js` we made as part of this diff.
Wait for Circle CI to run: https://circleci.com/workflow-run/e39a66d7-bf8a-4b31-a22f-eef30a2c53bc
[GENERAL] [BREAKING] [Babel] - Bump React Native Babel Preset version used by RN CLI to Babel v7 compliant release
Closes https://github.com/facebook/react-native/pull/19625
Reviewed By: TheSavior
Differential Revision: D8343861
Pulled By: hramos
fbshipit-source-id: 42644d5b0bfb40a8bc592ae3461c5008deef8232
Summary:
Bumps CI to latest BUCK release.
Test Plan
---------
Run on Circle CI.
Release Notes
-------------
[INTERNAL] [MINOR] [Tests] - Bump to BUCK v2018.03.26.01
Closes https://github.com/facebook/react-native/pull/19535
Differential Revision: D8240382
Pulled By: hramos
fbshipit-source-id: 60812cc90542201b362ef264083dd79dbf5d9360
Summary:
To better utilize Circle CI caching, yarn cache will use package.json file checksum as key in addition to arch, because in most cases yarn cache will be updated if package.json updates.
Circle CI sample apps use yarn.lock checksum as yarn cache key, but react-native don't have yarn.lock in the repo, so it's best to use package.json instead.
Closes https://github.com/facebook/react-native/pull/19395
Differential Revision: D8125405
Pulled By: hramos
fbshipit-source-id: 5c7aa312231cc0b42bc502a5177bb84e31bcd305
Summary:
This reverts a3931e9531
The open source `test_android` job is not configured to use Android 26 quite yet. I've spent a couple of days trying to get our Android tests back in working order, with no luck.
I'm reverting the change that bumped React Native to use build tools 26 + Android SDK 26. I encourage contributors interested in making this change happen to work on getting our Android tests working with API 26.
This will allow us to focus on getting `test_android` back to green, and _then_ we can work on bumping to API 26 while keeping tests green.
Reviewed By: fkgozali
Differential Revision: D8066226
fbshipit-source-id: 9bfd58a7f081c0971b78b331073e70545c21ca6d
Summary:
If `package.json` has changed, let's throw away the cache and let yarn install do its thing.
Circle CI.
[INTERNAL][MINOR][CircleCI] - Remove checksum fallbacks
Closes https://github.com/facebook/react-native/pull/19303
Differential Revision: D8029286
Pulled By: hramos
fbshipit-source-id: 528681e4da9f0215bf63f9f8b3920a95036badca
Summary:
Packages are now defined in `scripts/.tests.env`, so the checksum is updated accordingly.
We also throw away the cache if the checksum fails as not doing so may prevent us from picking up new packages due to the filesystem check in `scripts/android-setup.sh`#getAndroidPackages(), as the presence of the `installed-dependencies` file restored from cache will incorrectly flag all deps as being installed.
Closes https://github.com/facebook/react-native/pull/19298
Differential Revision: D8025918
Pulled By: hramos
fbshipit-source-id: 189492baac2fea39280884ea20e376a368e23c2e
Summary:
Update `scripts/run-android-emulator.sh` to use same settings as Circle CI when creating and launching an AVD. This helps provide a known good configuration, useful for running Android tests locally.
Run `scripts/run-android-emulator.sh` and confirm AVD is created && launched
Run `scripts/run-android-emulator.sh` again and see message about AVD already running
Run `test_android` on CI and observe AVD is launched.
Run `runXcodeTests.sh` and confirm unit tests run.
Run CI and confirm iOS unit tests run.
[GENERAL][MINOR][`scripts`] - Consolidate CI/local test scripts
Closes https://github.com/facebook/react-native/pull/19228
Differential Revision: D8019888
Pulled By: hramos
fbshipit-source-id: 28b12c2e781ee80bcc90c22e691a5acb16232369
Summary:
Yarn is not used in the Android step, not directly
Test Plan
Circle
Release Notes
[GENERAL][MINOR][.circleci] - Fix Android CI job
Closes https://github.com/facebook/react-native/pull/18421
Differential Revision: D7314158
Pulled By: hramos
fbshipit-source-id: ad40346b6a1c1f63a1b952fd05cbe9398d9c59a1
Summary:
Due to issues with Circle's Docker images ([link](https://twitter.com/circleci/status/974694807091073024)), jobs are failing with an error "yarn not found".
Test Plan
Run on Circle
Release Notes
[GENERAL][MINOR][.circleci] - Fix Circle issue
Closes https://github.com/facebook/react-native/pull/18419
Differential Revision: D7312052
Pulled By: hramos
fbshipit-source-id: 2768b9c69046a2f80518430024d3e7afbbd7de65
Summary:
Moving towards reusing existing scripts to ensure local and CI tests are kept in sync.
Closes https://github.com/facebook/react-native/pull/18307
Differential Revision: D7222664
Pulled By: hramos
fbshipit-source-id: ecce91e32159c55b19c29eab69a6754642f02236
Summary:
Although the test suites have a handful of failing tests, the jobs themselves do not fail.
Let's get these tests back into the fold so that we may track our progress getting these back to a good state.
cc dlowder-salesforce
Run tests on Circle, and confirm everything is green: https://circleci.com/workflow-run/4dd1a84b-502d-4ad6-aa41-64c768392a6b
If you go into the test iOS and test tvOS jobs, you will see that we are collecting test results at the top. These results show the failing individual tests.
Closes https://github.com/facebook/react-native/pull/18171
Differential Revision: D7151558
Pulled By: hramos
fbshipit-source-id: f105ec8bc97e80ed1b8358cde3f13a1ad3b271c2
Summary:
Some files have crept into the repo with the old license header. These are usually from PRs that were opened prior to the re-licensing of the project.
Let the script run, prior to fixing the errant files. The script outputs the following:
```
PATENTS crept into some new files?
--- /dev/fd/63 2018-03-01 01:42:48.250153746 +0000
+++ /dev/fd/62 2018-03-01 01:42:48.250153746 +0000
@@ -1 +1,9 @@
+Libraries/NativeAnimation/Nodes/RCTTrackingAnimatedNode.h
+Libraries/NativeAnimation/Nodes/RCTTrackingAnimatedNode.m
+ReactAndroid/src/main/java/com/facebook/react/animated/TrackingAnimatedNode.java
+ReactAndroid/src/main/java/com/facebook/react/views/text/CustomLetterSpacingSpan.java
+ReactCommon/yoga/yoga/YGLayout.cpp
+ReactCommon/yoga/yoga/YGLayout.h
+ReactCommon/yoga/yoga/YGStyle.cpp
+ReactCommon/yoga/yoga/YGStyle.h
scripts/circleci/check_license.sh
Exited with code 1
```
Fix the headers in these files and run the script again. No output, exit code 0.
Closes https://github.com/facebook/react-native/pull/18143
Reviewed By: sophiebits
Differential Revision: D7119356
Pulled By: hramos
fbshipit-source-id: d238e4d4a3ae320a2c8e625c2fa29690057a4814
Summary:
Sporadically, the instrumentation tests step will timeout while waiting for the apk to install on the emulator. By adding a 5 minute timeout, the command will be retried in these cases, where hopefully the install will go through.
Test Plan
Tested on Circle.
Closes https://github.com/facebook/react-native/pull/18127
Differential Revision: D7101890
Pulled By: hramos
fbshipit-source-id: 4dcc77153d794e9747df58ea40c011bc316b6c83
Summary:
This should fix our current Android test failures.
Closes https://github.com/facebook/react-native/pull/18002
Differential Revision: D7014218
Pulled By: hramos
fbshipit-source-id: 2933baf9fd05f3ad33306c3ca7b62da8af568db0
Summary:
These tests have not run for one reason or another since the migration from Travis. They are not passing, and are commented out to avoid flagging new PRs as breaking. These tests need to be fixed and re-enabled ASAP.
Closes https://github.com/facebook/react-native/pull/17959
Differential Revision: D6976781
Pulled By: hramos
fbshipit-source-id: 712a09877d0597c12cafa741779b471680b7d2db
Summary:
Every `job` is run in a separate container and so, `checkout` step is required for the Git host to be added to `~/.ssh/known_hosts`. Without this step, it will timeout after 10 minutes waiting for you to add (yes) or reject (no) from known hosts (we get this prompt when we checkout from a host for the very first time).
Closes https://github.com/facebook/react-native/pull/17956
Differential Revision: D6968130
Pulled By: hramos
fbshipit-source-id: 6d62166fd375f8f408cf5f18b188f841d035d97f
Summary:
Add checkout steps to reduce number of checkout/yarn calls
Tested on Circle CI.
Closes https://github.com/facebook/react-native/pull/17915
Differential Revision: D6942564
Pulled By: hramos
fbshipit-source-id: 72aff33eb099e24d63a80ec7d0630afedc21b630
Summary:
Circle is currently failing on the `android` step due to a dependency issue introduced by the aforementioned PR. I am currently waiting for an internal diff to be reviewed which will restore this PR alongside the necessary dependency.
Closes https://github.com/facebook/react-native/pull/17902
Differential Revision: D6937173
Pulled By: hramos
fbshipit-source-id: f732a397521cc5df36f503e618318ef6d69aeaa6
Summary:
Addresses CI build failures due to use of scoped packages by metro.
Closes https://github.com/facebook/react-native/pull/17878
Differential Revision: D6914937
Pulled By: hramos
fbshipit-source-id: e6ce97561035f4deb128cd1e30d81ab4edea3e4c
Summary:
Trivial - shorten the workflow steps to ease reading of current status when looking at workflows dashboard.
Closes https://github.com/facebook/react-native/pull/17874
Differential Revision: D6912599
Pulled By: hramos
fbshipit-source-id: c4bb08923eb790960b883a7a5f6e4652663982d8
Summary:
Always build the JavaScript bundle, to ensure failures here are surfaced regardless of failures that may happen earlier in this workflow
Closes https://github.com/facebook/react-native/pull/17824
Differential Revision: D6872794
Pulled By: hramos
fbshipit-source-id: bab3b9cfa6cecb578e9a3cffae27e1ce355588d2
Summary:
No logic change here. Part of a plan to consolidate CI-only files amongst .circleci and bots/ directories.
Closes https://github.com/facebook/react-native/pull/17807
Differential Revision: D6865976
Pulled By: hramos
fbshipit-source-id: 48607a80dcf8cac1c3c033c18bf5d6dd4cd8e6bf
Summary:
Switch to Yarn in order to more closely match internal Facebook environment.
Closes https://github.com/facebook/react-native/pull/17193
Differential Revision: D6572337
Pulled By: hramos
fbshipit-source-id: 331b1f331937e8ce3b787d48561e2e655d4a1cc9
Summary:
Current setup prevents Android signal from being obtained when JavaScript environment is affected.
Proposed setup will configure Android build environment, surfacing any issues affecting Android even when a JavaScript bundle cannot be built.
We cannot proceed with unit tests and instrumentation tests if JavaScript is affected, but we will at least still get some signal from running BUCK.
Closes https://github.com/facebook/react-native/pull/17709
Differential Revision: D6775966
Pulled By: hramos
fbshipit-source-id: e50916c39060ed4e8ca880fcecc2830a51539bbd
Summary:
This should help make it clearer, at a glance, which specific step is failing.
Run on Circle. Workflows will now show that Node 8 JS tests are green, but Node 6 JS tests are not. Lint/flow checks are also not green. Previously, it would be necessary to open the two test-node workflows to investigate which particular test failed. Given these tests and checks tend to break often, the additional clarity would be helpful.
<img width="485" alt="screen shot 2017-12-20 at 9 40 07 am" src="https://user-images.githubusercontent.com/165856/34220526-ce3d3b26-e569-11e7-803f-0e4bf1090f2f.png">
Closes https://github.com/facebook/react-native/pull/17293
Differential Revision: D6612623
Pulled By: hramos
fbshipit-source-id: c84351da50916e72e52c4271e2a31c16f6cdfbb9
Summary:
Android tests on CI have been failing since late October due to dd016f334c which makes use of a new Buck feature, `required_for_source_only_abi`. Circle was using an older September release. In this PR, we update to the latest release.
Green is good. Red is bad.
Wait for Circle to run.
[INTERNAL][BUGFIX][./circleci/config.yml] - Update Buck version
Closes https://github.com/facebook/react-native/pull/16861
Differential Revision: D6355335
Pulled By: hramos
fbshipit-source-id: 411d0b229f0dfb7e9dfc07c300b6546bf7afcdfe
Summary:
This pull request migrates Travis to Circle and pre-starts iOS simulators / tvOS ones as advised in documentation to speed up builds. It also uses Xcode 9.0 to build and test apps.
Note that podspec test is failing and it's been failing for a while on Travis as well (since podspec has been changed to use Cxx bridge by default). I've notified few folks here of that and we are looking to fix this test, but it's not related to the scope of this PR.
Also, previously, podspec tests were only runninng on master (disabled for PR builds) where I think it makes more sense to run them on PR builds as well (all in all, we want to prevent breakage before merging). That said, I've removed `if` check to make it run on all builds.
Other small changes:
- cache `node_modules` properly (previously defined as restore_cache and save_cache but not referenced in following jobs)
Closes https://github.com/facebook/react-native/pull/16354
Differential Revision: D6054858
Pulled By: hramos
fbshipit-source-id: 5165bef0985f4257febced14873be5bcb80b9f51
Summary:
Recent changes that introduced Circle 2 (thanks ide and hramos for work on this) include special step for analyzing code. It takes PR number and processes the build.
Unfortunately, that breaks all non-PR builds (including ones scheduled by me as a part of release step).
This PR simply checks if such env variable is set and stops executing in case it's undefined.
Also, I have updated the order of the tests so that most important (unit tests) are no longer shadowed by temporary eslint and flow breakage. The reason for this change is that flow has been broken for ~20 days which shadowed breakage in unit tests (addressed in my other PR).
You can see build breaking before this change: https://circleci.com/gh/facebook/react-native/22391
And being green after: https://circleci.com/gh/facebook/react-native/22530
Closes https://github.com/facebook/react-native/pull/16302
Differential Revision: D6031348
Pulled By: hramos
fbshipit-source-id: f1127a87faa872f413e9fcb780bdc1d5d587de2c