Граф коммитов

168 Коммитов

Автор SHA1 Сообщение Дата
Héctor Ramos e106112202 Use Xcode 10.2.0 and iOS 12.2 in iOS tests
Summary:
Bumps to Xcode 10.2.0 and uses the iOS 12.2 simulator when running tests.

The `testBundleURL` test is temporarily disabled to allow the iOS unit tests to run successfully in the internal Facebook CI system.

Changelog:

[iOS] [Changed] - iOS tests: Bump Xcode to 10.2.0, iOS to 12.2.

Reviewed By: TheSavior

Differential Revision: D14962710

fbshipit-source-id: 769cfb90aacce33903ab6e8dbcc5b5727deacf41
2019-04-22 23:25:00 -07:00
Sebastian McKenzie 37bf2ce146 Remove unnecessary top-level `return`
Summary:
Removes the top-level return used in `run-android-ci-instrumentation-tests.js`.

This prevents the file from being parsed as a module. The top-level return here doesn't serve any purpose because it doesn't block the execution of any code after it, as there is no more code to execute.

Reviewed By: cpojer

Differential Revision: D15000395

fbshipit-source-id: 7acf010bb25dec5048813d01517875bcb6eb5a15
2019-04-18 12:00:35 -07:00
Héctor Ramos 5bac2b761e Run the same JavaScript test script in Sandcastle and Circle (#24422)
Summary:
Consolidate JavaScript tests from open source into a single script that can be executed by both Circle CI and Sandcastle, the internal Facebook CI.

[General] [Changed] - Switch internal and external CI to use the same script when running JavaScript tests

Pull Request resolved: https://github.com/facebook/react-native/pull/24422

Reviewed By: cpojer

Differential Revision: D14895773

fbshipit-source-id: d428929cc4e5219e02f5920259e08e0b3d24874c
2019-04-12 09:54:09 -07:00
gengjiawen 6a3e7991a8 add docker test to circle-ci (#24375)
Summary:
add docker related test to ci (only build part), prevent future regression like https://github.com/facebook/react-native/pull/24360

[General] [Added] - add docker related test to ci
Pull Request resolved: https://github.com/facebook/react-native/pull/24375

Differential Revision: D14865224

Pulled By: hramos

fbshipit-source-id: 8fbc2935b0479c362a0fb68022a1157ff68b0325
2019-04-09 18:18:25 -07:00
Salakar 65d6c3f3a0 Upgrade detox to v12.1.1 (#24204)
Summary:
This PR upgrades Detox from version 9.0.4 to 12.1.1.

[General] [Changed] - Upgrade e2e tests to use Detox 12.1.1 (from v9).

Pull Request resolved: https://github.com/facebook/react-native/pull/24204

Reviewed By: TheSavior

Differential Revision: D14710489

Pulled By: hramos

fbshipit-source-id: eeea341f28140d0d259a0d22f7265cf1cd3fec45
2019-04-09 16:08:35 -07:00
Héctor Ramos 742d02a172 Fix Docker Android tests container issue related to the JSC (#24360)
Summary:
[Fixes an issue where the Docker Android tests container cannot be built.](https://github.com/facebook/react-native/pull/24276#issuecomment-480915232) The JSC is now pulled from the npm registry, so we need to run `yarn` prior to pulling the Gradle dependencies.

[Android] [Fixed] - Fixed React Native Android tests Docker container issue related to the JSC
Pull Request resolved: https://github.com/facebook/react-native/pull/24360

Differential Revision: D14842534

Pulled By: hramos

fbshipit-source-id: 3a1a714879e9c52a812b1077dce449470c30bddd
2019-04-08 16:06:00 -07:00
Mike Grabowski 5558333c60 Update React Native to use latest CLI (#23940)
Summary:
Landing D14472633 again which failed because of a metro-buck issue.

Latest CLI requires `reactNativePath` to be explicitly set when `react-native` is not present under `node_modules` (which is the case when running from source).

Fixes #23936

This PR also updates CLI to latest version and removes private calls to `findPlugins` (it's now exposed under public interface).

We also remove custom `rn-cli.config.js` options that are no longer needed that we have `--reactNativePath`. I added them a month ago as a temporary workaround.

[GENERAL] [FIXED] - Internal - Update to the latest CLI
Pull Request resolved: https://github.com/facebook/react-native/pull/23940

Reviewed By: rickhanlonii

Differential Revision: D14501686

Pulled By: cpojer

fbshipit-source-id: c8dac71b3806d81c9d18b6d4a7e92d82962791f9
2019-03-18 06:22:53 -07:00
Adam Ernst 0ceaaf0cf6 Revert D14472633: [react-native][PR] Update React Native to use latest CLI
Differential Revision:
D14472633

Original commit changeset: b7ea92ee130d

fbshipit-source-id: ed5bce3ba4a39c8b60e787cb678747231583f6f5
2019-03-15 14:07:54 -07:00
Mike Grabowski 1fe4799a88 Update React Native to use latest CLI (#23940)
Summary:
Latest CLI requires `reactNativePath` to be explicitly set when `react-native` is not present under `node_modules` (which is the case when running from source).

Fixes #23936

This PR also updates CLI to latest version and removes private calls to `findPlugins` (it's now exposed under public interface).

We also remove custom `rn-cli.config.js` options that are no longer needed that we have `--reactNativePath`. I added them a month ago as a temporary workaround.

[GENERAL] [FIXED] - Internal - Update to the latest CLI
Pull Request resolved: https://github.com/facebook/react-native/pull/23940

Differential Revision: D14472633

Pulled By: cpojer

fbshipit-source-id: b7ea92ee130da6730aa0093265958aa1b8c2ab97
2019-03-15 11:07:48 -07:00
Héctor Ramos 427b94b56b Docker: Use the new community image, and update instructions. (#23723)
Summary:
The `Dockerfile.android` had fallen out of date. We now point to the new community image being used in the Circle CI `test_android` workflow. After spending an hour or two working with these Docker images, I saw some opportunities to clean up the docs as well.

[ANDROID] [Fixed] - Use new React Native Community Android base image for local Docker tests.
Pull Request resolved: https://github.com/facebook/react-native/pull/23723

Differential Revision: D14331737

Pulled By: hramos

fbshipit-source-id: cf42820021c997c3c06cc8b3671f67c9d2650ee5
2019-03-05 15:37:13 -08:00
Héctor Ramos 14a3a019ef Move Dockerfiles into Circle CI directory (#23677)
Summary:
This is an effort to clean up the root of the repository. Everything related to Docker is being moved to the `.circleci` directory, as these images are used as part of the Circle CI 2.0 tests on Android.

[GENERAL] [Changed] - Moved Dockerfiles into .circleci directory
Pull Request resolved: https://github.com/facebook/react-native/pull/23677

Differential Revision: D14253735

Pulled By: cpojer

fbshipit-source-id: 4d482d531a71b8259b09c001b310d82ce5349b87
2019-02-27 19:34:41 -08:00
Héctor Ramos 39ecd5642d Annotate our CircleCI config (#23606)
Summary:
Inspired by [react-native-netinfo's config](https://github.com/react-native-community/react-native-netinfo/blob/master/.circleci/config.yml). Annotate each of the major sections in our Circle CI config to reduce friction when contributing to our open source test infrastructure.

I've also removed all single-use aliases. While the old layout improved readability when looking at a particular job, it also obscured the actual command being run, as well as introduced unnecessary friction (contributors would need to understand how aliases work, syntax is finicky).

I've also moved the oss sanity checks to the analysis job, as we don't want this test to block the checkout_code job from succeeding, which would block all other downstream jobs.

There should be no other material changes to the actual jobs.

[General] [Changed] - Updated open source test configuration
Pull Request resolved: https://github.com/facebook/react-native/pull/23606

Differential Revision: D14199783

Pulled By: hramos

fbshipit-source-id: 61072eec5c05b8731916a9d8f6bc09ae5191fbb5
2019-02-23 17:04:22 -08:00
Eric Lewis 9ca7565563 Enable js e2e tests (#23571)
Summary:
Part of #23561. Small refactor to use 1 marker for the different tests, as it doesn't matter where it is- so long as we can detect it.

[General] [Fixed] - turn on JS e2e tests
Pull Request resolved: https://github.com/facebook/react-native/pull/23571

Differential Revision: D14172069

Pulled By: hramos

fbshipit-source-id: cdde369a09d3528d05fec01d015613b3397714e6
2019-02-21 13:16:42 -08:00
Eric Lewis 4a01be47cd Fix iOS e2e test (#23566)
Summary:
As part of #23561 this is an attempt at fixing iOS.

[iOS] [Fixed] - e2e test
Pull Request resolved: https://github.com/facebook/react-native/pull/23566

Differential Revision: D14162780

Pulled By: cpojer

fbshipit-source-id: b55d32e30f88370100f7fbddf9dfb208280844f4
2019-02-20 22:01:12 -08:00
Héctor Ramos 9820c88877 No longer run disabled tests on Héctor's PRs (#23562)
Summary:
Do not run disabled tests, even when the commit / PR is pushed by hramos. See the existing functionality at https://circleci.com/gh/facebook/react-native/73844?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link:

![screen shot 2019-02-20 at 8 21 39 am](https://user-images.githubusercontent.com/165856/53106776-90ecb600-34e8-11e9-9b02-a7f3990407b2.png)

There are a handful of tests that are known to be broken in Circle CI. This has been the case since at least Fall 2017, when we migrated to Circle 2.0. These tests haven't been fixed for several reasons, one of them being that once they were removed from the Circle CI config, the pressure to fix them has been lowered.

Last year, I added these disabled tests back to Circle CI, but used a script to prevent them from running unless the job was initiated by myself. This would allow us to get good signal from Circle CI without polluting results with known failing tests, while still showing me which tests needed some work before getting re-enabled again.

In practice, this functionality is introducing more friction as I work on fixing new CI failures: my own fixup PRs are marked as failing due to these "disabled tests" (see test_android on https://github.com/facebook/react-native/pull/23558). To ensure we don't lose track of these failures, I've created an umbrella issue at https://github.com/facebook/react-native/issues/23561.
Pull Request resolved: https://github.com/facebook/react-native/pull/23562

Differential Revision: D14161172

Pulled By: cpojer

fbshipit-source-id: 040500dcb433d3127c64a42b31f94af6bbaa6ed1
2019-02-20 18:46:22 -08:00
gengjiawen 539ca06d0f refactor nodejs image in analyze_pr task (#23433)
Summary:
move all node image to official one, and remove redundant path.
Pull Request resolved: https://github.com/facebook/react-native/pull/23433

Differential Revision: D14080808

Pulled By: cpojer

fbshipit-source-id: c8f7ec90a8c59129a0d8c5667f3c648dd7865be3
2019-02-14 02:33:49 -08:00
gengjiawen 410d583951 lock docker image version in ci (#23424)
Summary:
Lock the version will help us to test new dependency version like ndk or buck.
Pull Request resolved: https://github.com/facebook/react-native/pull/23424

Differential Revision: D14065171

Pulled By: cpojer

fbshipit-source-id: 954297ca7c69ff829a4522f34274ae8ab162b36b
2019-02-14 02:21:08 -08:00
gengjiawen e4fac61d57 switch node 8 image to official one (#23425)
Summary:
node 8 image has yarn too. Also the official one has the latest yarn.
Pull Request resolved: https://github.com/facebook/react-native/pull/23425

Differential Revision: D14065105

Pulled By: cpojer

fbshipit-source-id: 4eb3347fc191d928091e984fe3e5887861ec8aa9
2019-02-13 06:32:43 -08:00
gengjiawen e6320c6e75 switch to official node image in ci (#23423)
Summary:
The official node image bundled with yarn by default, and it has maintained by the official group so we can always get the latest version.
Pull Request resolved: https://github.com/facebook/react-native/pull/23423

Differential Revision: D14064773

Pulled By: cpojer

fbshipit-source-id: c24a2bc2d0dda7ae852b25c340ca0d149f4c196c
2019-02-13 05:11:17 -08:00
gengjiawen 392e89676f add prettier check in ci (#23382)
Summary:
enforce code format
Pull Request resolved: https://github.com/facebook/react-native/pull/23382

Differential Revision: D14024609

Pulled By: cpojer

fbshipit-source-id: 21176cf8f009987e5a281bbead414374632eabee
2019-02-11 09:06:43 -08:00
Héctor Ramos d002d30325 Danger, be nice to PRs. (#23334)
Summary:
Changed Danger's config so that it provides advice whenever it finds an issue with the pull request template, instead of posting a warning.

Updated Danger several major versions, from 2 to 7. I worked through any breaking changes, which were minimal (change `yarn danger` to `yarn danger ci`).

Added a flag to have Danger post these messages as GitHub Checks instead of as a comment. This slightly buries Danger's output, as it's no longer posted as a comment, but I believe it integrates more nicely into the GitHub interface.

[GENERAL] [Changed] - GitHub-only change: updated Danger config to be nicer to PRs
Pull Request resolved: https://github.com/facebook/react-native/pull/23334

Differential Revision: D14002313

Pulled By: cpojer

fbshipit-source-id: b97ca7b7bd164646b249b7c64b1134306e0f38a8
2019-02-08 03:36:58 -08:00
gengjiawen 9351dd6c69 migrate ci to official docker (#21477)
Summary:
Simplify current build and offer it to community as official docker.
I have also created an [rfc](https://github.com/react-native-community/discussions-and-proposals/pull/36).
pass all current ci.
none
 [GENERAL] [INTERNAL] [CI] - migrate ci to official docker
Pull Request resolved: https://github.com/facebook/react-native/pull/21477

Differential Revision: D13801696

Pulled By: cpojer

fbshipit-source-id: fa235cf21ab5af2c87eb3c1a14788fab01c71ccf
2019-01-24 06:31:00 -08:00
Dulmandakh 8a8a11b77a fix validate-android-test-env.sh (#22961)
Summary:
fix validate-android-test-env.sh to not parse .gradle files for build tools versions, because it was removed.

Changelog:
----------
[CI] [Changed] - fix validate-android-test-env.sh to not try parse .gradle files
Pull Request resolved: https://github.com/facebook/react-native/pull/22961

Differential Revision: D13655750

Pulled By: hramos

fbshipit-source-id: 1accb6ac7a7c74ab335dd92977b0b090820a622c
2019-01-14 10:54:18 -08:00
Dulmandakh 62264b7ce2 bump buck to 2019.01.10.01 (#22960)
Summary:
bump Buck to 2019.01.10.01

Changelog:
----------
[General] [Changed] - bump Buck to 2019.01.10.01
Pull Request resolved: https://github.com/facebook/react-native/pull/22960

Differential Revision: D13640470

Pulled By: hramos

fbshipit-source-id: 125e127eb5e71daaebcadbde6c067651c9c17986
2019-01-11 15:19:01 -08:00
Héctor Ramos 86d0611c5a test_ios → : Update iOS Snapshots, remove tvOS tests, disable failing tests (#22720)
Summary:
The following tests are disabled in this PR:

- testTimersTest is failing due to undefined this.setTimeout, probably introduced back in 61346d3. Tracking a fix in https://github.com/facebook/react-native/issues/22695
- testTheTester_ExpectError is failing as RCTTestRunner is not properly passing through the error. Tracking a fix in https://github.com/facebook/react-native/issues/22697

I've added a comment regarding testWebSocketTest and how to ensure it passes locally.

This PR also fixes all remaining snapshot tests, which were failing due to the use of iPhone XS as a iOS Simulator on Circle CI. We are using iPhone 6s for SST internally, and this allows us to be consistent.
Pull Request resolved: https://github.com/facebook/react-native/pull/22720

Differential Revision: D13532788

Pulled By: hramos

fbshipit-source-id: 75681236032839bf88180611ee68826b53cc96eb
2018-12-20 15:08:47 -08:00
Héctor Ramos 5194495e97 Propagate exit code in test_objc (#22562)
Summary:
Any failures in `test_objc` within the objc-test.sh script have been kept hidden as `xcpretty` was swallowing the exit code from xcodebuild.

Fixes the issue TheSavior brought up in #22470 where failing snapshot tests were not reflected on Circle.

Run on Circle CI and confirm `test_objc` fails (iOS tests *are* broken on master).
Pull Request resolved: https://github.com/facebook/react-native/pull/22562

Differential Revision: D13406987

Pulled By: hramos

fbshipit-source-id: 3f3da01ab4c0ad87077813b06d2fdf788f32f6b8
2018-12-10 20:34:12 -08:00
Christoph Nakazawa 63a6bb7637 Remove remaining references to local-cli
Summary: This removes the remaining references to `local-cli`. We already have a `cli.js` file on the root that was just forwarding to the local-cli folder, so I removed that. It also seems that `setupBabel.js` is no longer necessary in RN.

Reviewed By: TheSavior

Differential Revision: D13396218

fbshipit-source-id: a945cb91dae39c4b58c5cabcca6b0f0328fc4717
2018-12-10 19:08:10 -08:00
Héctor Ramos 44878ea9bc Fix code analysis bot failure to post lint warnings on pull requests
Summary:
The code analysis script takes the results of `eslint .` and filters out any messages for filepaths outside of what is modified in a given pull request. This diff fixes an issue where the bot will fail to post warnings if a pull request contains multiple commits, where the most recent commit is a rebase (e.g. 63c00f20a7 in https://github.com/facebook/react-native/pull/22470). This happens because the script looks for files changed in the most recent commit in a PR.

In this diff, we switch to a new GitHub API that returns the list of all files changed by a PR, obviating the need to go through individual commits in a PR to look for changed files.

Reviewed By: TheSavior

Differential Revision: D13324154

fbshipit-source-id: f9f50028439d1969b0feea65f0b3e8bf75ac1a33
2018-12-05 13:15:56 -08:00
Dulmandakh 9d00d4d5bb Bump Android SDK to 28, Build Tools to 28.0.2, Gradle to 4.7, Gradle Plugin to 3.2.0 (#21632)
Summary:
This PR is bumping compileSdkVersion to 28, buildToolsVersion to 28.0.2, Gradle to 4.7, Android Gradle plugin to 3.2.0.

Gradle 4.7 added support for Java 10 and 11.

allow-large-files

Release Notes:
--------------
[ANDROID] [ENHANCEMENT] [SDK] - bump to 28

Pull Request resolved: https://github.com/facebook/react-native/pull/21632

Reviewed By: mdvacca

Differential Revision: D13084836

Pulled By: hramos

fbshipit-source-id: e0f493881e80e87faf8c3ef1ac77044495966a49
2018-12-05 09:06:31 -08:00
Héctor Ramos 04af674c38 Bump RN OSS iOS tests to iOS SDK 12.1, Xcode 10.1
Summary:
Use Xcode 10.1 and iOS 12.1 SDK to run iOS tests on an iOS 12.1 iPhone XS Simulator, all of which are available on a default Xcode 10.1 install.

Note that we were previously running iOS tests using Xcode 10.1 and the 12.1 SDK in a separate `test_xcode10` workflow on Circle CI. This was in place to allow us to track Xcode 10 compatibility during the Xcode 10 beta. Now that Xcode 10 has been public for a while, we can drop the compatibility check and use Xcode 10 in our main iOS test workflow.

Reviewed By: TheSavior

Differential Revision: D13317891

fbshipit-source-id: 04c17bf3a2e9d3617f14a46b4ed30a5491a4f4a4
2018-12-04 12:06:59 -08:00
Héctor Ramos 9e0b79114c Pass Circle CI branch information to Coveralls (#22489)
Summary:
Trivial. Coveralls expects CI_BRANCH to be set. Circle uses CIRCLE_BRANCH instead. Without this, Coverals will attribute coverage reports to a "patch-1" branch.
Pull Request resolved: https://github.com/facebook/react-native/pull/22489

Differential Revision: D13306787

Pulled By: hramos

fbshipit-source-id: 70ad525168f249f4ca7f0370ba941632c33da8c5
2018-12-03 11:47:34 -08:00
Héctor Ramos 69e9c9d371 Add Coveralls to package.json [1/2] (#21017)
Summary:
Adds a new step to the test suite. Test coverage is now collected and sent to Coveralls.

Initial configuration is limited to the Libraries/ and local-cli/ directories. Please let me know if additional directories should be considered.

I have enabled this repo on the coveralls service. The coveralls token has been added to React Native's Circle CI environment variables.

- Track coverage on PRs, and fail PRs that lower the coverage %
- Increase coverage :)

[INTERNAL] [ENHANCEMENT] [.circleci/config.yml] - Start tracking code coverage (JS)

Pull Request resolved: https://github.com/facebook/react-native/pull/21017

Differential Revision: D9724396

Pulled By: hramos

fbshipit-source-id: 61da4478877805f9a9a3c9670b54ddc4e40e958b
2018-11-30 19:49:00 -08:00
Dulmandakh b40e23dee5 bump buck to 2018.10.29.01. fixes Android CI (#22049)
Summary:
Bump buck to latest or 2018.10.29.01, which will fix Android CI.
Pull Request resolved: https://github.com/facebook/react-native/pull/22049

Differential Revision: D12879205

Pulled By: TheSavior

fbshipit-source-id: 5d196fba38cb27266cadbebae00367aa773751ca
2018-10-31 21:42:36 -07:00
Héctor Ramos bb93abf5ca Fix checkout_code: Remove Metro cache check (#21998)
Summary:
This was a specific check that was prone to break at some point. That time has come. Removing it as it is not providing any useful signal.
Pull Request resolved: https://github.com/facebook/react-native/pull/21998

Differential Revision: D12823839

Pulled By: hramos

fbshipit-source-id: e870670d7803af78c4559052613ea364ce1478df
2018-10-29 08:46:09 -07:00
Héctor Ramos 5c5af3e1c9 Enforce lockfile is kept up to date (#21739)
Summary:
Adds a new script that runs Yarn with --frozen-lockfile, and fails if Yarn finds the lockfile is out of sync.

Keeping the lockfile in sync with package.json will ensure our internal open source tests can run offline, as our offline mirror is updated whenever the lockfile changes.

Reverted yarn.lock to https://raw.githubusercontent.com/facebook/react-native/6eeff75849c9b8bf91592c1b7906b4dab8fba518/yarn.lock, then ran `scripts/circleci/validate_yarn_lockfile.sh`, and verified the script failed as expected.

I then ran Yarn without the --frozen-lockfile flag, and reran the validation script. This time, the script finished successfully.
Pull Request resolved: https://github.com/facebook/react-native/pull/21739

Differential Revision: D10365642

Pulled By: hramos

fbshipit-source-id: 9ab7f03919427a86b12901d4c422ef04dd0839f6
2018-10-12 14:17:09 -07:00
Dulmandakh 436cf154bb bump Android NDK to r17c (#21628)
Summary:
bump Android NDK to r17c, which is only available revision to download for r17. And it includes bug fixes.
Pull Request resolved: https://github.com/facebook/react-native/pull/21628

Differential Revision: D10352162

Pulled By: hramos

fbshipit-source-id: d372e55443260242a44a1f73698977a3e361f001
2018-10-11 22:08:37 -07:00
Héctor Ramos 6967a4fa56 Flag code analysis issues once per converter used (#21503)
Summary:
Fixes issue where the bot would leave multiple lines in the top review comment if, say, eslint found 30 issues, there would be 30 mentions of eslint having found issues.

See https://github.com/facebook/react-native/pull/21492 for an example of such a case, where `analysis-bot` left a spammy review at https://github.com/facebook/react-native/pull/21492#pullrequestreview-161837975.
Pull Request resolved: https://github.com/facebook/react-native/pull/21503

Differential Revision: D10219439

Pulled By: hramos

fbshipit-source-id: 75d32ef3bfeaa91ab614763a19494659ad1be0dd
2018-10-05 11:33:38 -07:00
Héctor Ramos 925f63dfbe Run publish_npm_package job on tagged commits without any pre-reqs (#21495)
Summary:
This PR gets master back on sync with fixes made to 0.57-stable.
Pull Request resolved: https://github.com/facebook/react-native/pull/21495

Differential Revision: D10209745

Pulled By: hramos

fbshipit-source-id: bc4d859adade820eac30e947514b6c6c2a27083f
2018-10-04 20:20:10 -07:00
Héctor Ramos 53b487d215 Use ShellCheck (#19681)
Summary:
As recommended in https://circleci.com/docs/2.0/using-shell-scripts/#use-shellcheck

It will only run on PRs for now.
Pull Request resolved: https://github.com/facebook/react-native/pull/19681

Differential Revision: D10111711

Pulled By: hramos

fbshipit-source-id: e980a526561dced79e5197a11cfb41a3eba9be8b
2018-09-28 17:03:24 -07:00
empyrical 99cacf4830 package.json: Add flow check commands for iOS and Android (#21326)
Summary:
This PR adds these two scripts to `package.json`:

 * `flow-check-ios` - for running `flow check` on `.ios.js` files
 * `flow-check-android` - for running `flow check` on `.android.js` files

The Android command makes use of the new `--flowconfig-name` option added to Flow in `0.80.0`
Pull Request resolved: https://github.com/facebook/react-native/pull/21326

Differential Revision: D10055702

Pulled By: hramos

fbshipit-source-id: e647f8d2995da0a9bd6af242218819fd5745df63
2018-09-26 17:03:07 -07:00
Héctor Ramos 544adcaf4f Test Xcode 10 (#21324)
Summary:
This also fixes an issue with tagged commit Circle CI jobs, and avoids running the `publish_npm_package` on every commit. The new config ignores commits on *all branches*, but should still catch git tags.
Pull Request resolved: https://github.com/facebook/react-native/pull/21324

Differential Revision: D10041629

Pulled By: hramos

fbshipit-source-id: 9b3295b5fcd614c67a8838ffd49c6a5d6ae7fd86
2018-09-25 20:39:55 -07:00
Héctor Ramos b0946006e7 Deploy to npm on tagged commits only (#21250)
Summary:
This PR applies some fixes I made to the 0.57-stable branch to ensure we only run on commits tagged as "v0.57.1", as an example. This also ensures we only deploy after all tests pass.
Pull Request resolved: https://github.com/facebook/react-native/pull/21250

Differential Revision: D10003666

Pulled By: hramos

fbshipit-source-id: 22d5e674ca925dce53d0ddf0e12c64dc82ec7aa1
2018-09-22 09:16:58 -07:00
Héctor Ramos 5068dfcad3 Use Android SDK 27 in React Native
Summary:
Upgrade React Native to Android SDK 27 again, following the reversal in D9886607 (68c7999c25).

The SDK 27 is actually available internally in an alternate location that is suitable for use cases like React Native's. For future reference, SDK 28 is also available for use in this location.

Reviewed By: axe-fb

Differential Revision: D9929066

fbshipit-source-id: 9413f891d5587293a30544351340e9407a2dce55
2018-09-20 07:56:23 -07:00
Héctor Ramos 68c7999c25 Downgrade to compileSdkVersion 26
Summary:
Go back to using compileSdkVersion 26 and targetSdkVersion 26, temporarily. We can re-add this once Android SDK 27 becomes available in Facebook's internal repository.

The Android SDK Build Tools 27.0.3 **are** available, so we can continue using those.

Reviewed By: axe-fb

Differential Revision: D9886607

fbshipit-source-id: 6c1c9c1e1309c3a0483cc4c0bd8dcb4a5f29fc7e
2018-09-18 08:02:50 -07:00
Héctor Ramos 023d650a0d Remove tokens from Circle CI config (#21058)
Summary:
While these were intentionally used in the open, and never were abused, it has become a distraction whenever they are flagged.

We'll have to move this functionality to a service outside of Circle CI, as we cannot securely pass secrets to forks and PRs in Circle CI. By necessity, these PR analysis scripts must run alongside PRs.

The The controller you requested could not be found. token has already been revoked. The The controller you requested could not be found. token is not under our control, and is still valid as of this writing. The eslint token has public_repo scope, with no access to any private repos. It's no different than having a random account commenting on any public repo.

Unfortunately, revoking the The controller you requested could not be found. token affects React's use of this bot account as well.

 ---

Q: What does the React team need this token for?
A: It's used to analyze how a PR will impact the build size for React.

Q: What does the React Native team need this token for?
A: We do lightweight automated PR code reviews with it (eslint, flagging large PRs, etc)

Q: What can someone do with the access token?
A: The token was for the The controller you requested could not be found. GitHub account. The account has no privileged access to any organization, so in effect it's like having the token to a random GitHub account. The token has public_repo access scope, which allows it to interact with any public repository on GitHub. The attacker can leave comments on any issue, pull request, or commit, on any public open source repository on GitHub. They could spam or leave arbitrary messages. It's no different than using any random newly created GitHub account to do this, but the bot is named "React Linter", so people could have used it to make React look bad.

Q: Why didn't we just remove the token from the open source repositories? CircleCI allows you to use environment variables to keep secrets out of the repo.
A: We have configured CircleCI to hide environment variables from Circle CI jobs triggered by non-Facebook org forks and pull requests (otherwise, anyone could add a file to their fork that echoes $SUPER_SECRET and then read it from the Circle CI logs). This allows us to do things like publish to npm only on commits that actually land on the main repo, without letting random people do the same on their forks.

Q: Why can't we run these scripts on Circle CI jobs that do have access to secret environment variables?
A: It's by necessity. These scripts are meant to run on pull requests and forks. They're used to lint pull requests, after all.

Q: Why can't we run these scripts on internal Facebook infrastructure?
A: Automatic importing of arbitrary code from external sources into internal Facebook systems without a FB engineer's involvement  is disallowed. We're happy to let Circle CI run unvetted code in this manner.

Q: What do other projects do in similar situations?
A: A common solution for open source projects that need to run scripts with access to GitHub without exposing the access token on CI is to use a private cloud server (i.e. a droplet in Digital Ocean, an instance on AWS...).

Q: Why don't we use the same infra used by react-native-bot to run react-linter?
A: React-Native-Bot runs once an hour or so, querying for recent issues and PRs. It does not use webhooks, and instead performs the same kind of search queries you'd use on GitHub, therefore it's not great for picking up when a PR has been updated. Circle CI is great for running scripts whenever a PR is created or updated, as Circle outages aside, we can be fairly certain a script will run any time a PR is updated. If you want to track build sizes, you really want to make sure any new commit added to a PR will trigger a re-run.
Pull Request resolved: https://github.com/facebook/react-native/pull/21058

Differential Revision: D9809842

Pulled By: hramos

fbshipit-source-id: 6ca5d2f5b48e077ec822a3aea5237534bd828850
2018-09-13 07:48:14 -07:00
Eli White ee543ecf86 Bump Detox to 8.2.3
Summary: 8.2.2 was a broken version, bumping to 8.2.3.

Reviewed By: yungsters

Differential Revision: D9539442

fbshipit-source-id: 554cc34261d988464671d0c4e4a7a18b6d495b73
2018-08-28 12:59:37 -07:00
Héctor Ramos 1fe7b40a33 Fix eslint code analysis bot (#20822)
Summary:
The eslint bot has not been working since the migration to Circle 2.0.
Pull Request resolved: https://github.com/facebook/react-native/pull/20822

Differential Revision: D9492680

Pulled By: hramos

fbshipit-source-id: 7f2f9ac125b6cab1750902c485a6d27d6c3cf302
2018-08-23 20:34:51 -07:00
Héctor Ramos d0f0e8e248 Gate failing steps behind a username check (#20818)
Summary:
There are some steps known to be failing on master. This pollutes checks for unrelated PRs.

This PR will make it so that PRs submitted by anyone other than myself will no-op on these steps.

Future work: Have an array of whitelisted contributors, and make it much easier to turn individual tests on and off.
Pull Request resolved: https://github.com/facebook/react-native/pull/20818

Differential Revision: D9484946

Pulled By: hramos

fbshipit-source-id: d6c187b341f13552b33d0f1d569b65f6c66ae48f
2018-08-23 15:18:04 -07:00
Héctor Ramos aae3a7816e Use one time password when publishing to npm (#20701)
Summary:
This pull request addresses the failing publish-npm.js script from earlier this week. For background, last month we reset all npm access tokens for any package related to Facebook, and we now require all accounts with publish permissions to have two factor enabled.

The publish-npm.js script relied on one such token that is configured in Circle CI as a envvar. The token has been updated in Circle CI, but we now need a way of passing the one time password to npm.

With this PR, we can now grab the otp from Circle CI's envvars. Considering otps are ephemeral, this requires the NPM_CONFIG_OTP envvar to be set by someone with publishing permissions anytime a new release will be pushed to npm. The token is short lived, but it would still be good to clear the envvar after the package is published. Circle CI envvars are not passed on to PR/forked builds.

This PR is effectively a breaking change for the release process, as the publish step will not succeed if the OTP is not valid.

OTPs are short-lived, and the publish_npm_package job will definitely outlive the token. Unfortunately this will require some timing to get right, but the alternative is to ssh into the Circle CI machine and re-run the `npm publish --otp` command, which again would still require someone with publish access to provide the otp.
Pull Request resolved: https://github.com/facebook/react-native/pull/20701

Differential Revision: D9478488

Pulled By: hramos

fbshipit-source-id: 6af631a9cb425271b98c03d158aec390ebc95304
2018-08-22 23:32:27 -07:00
Dulmandakh 044b399e65 Bump compileSdkVersion to 27 and buildToolsVersion to 27.0.3 (#20777)
Summary:
I found that android support library 27.x (874cca1ac2) requires compileSdkVersion to be 27. Also found that many FB projects use SDK 27.
Pull Request resolved: https://github.com/facebook/react-native/pull/20777

Differential Revision: D9478431

Pulled By: hramos

fbshipit-source-id: ca100f6b5b39e7d112926124423f9510a0efc291
2018-08-22 23:19:42 -07:00
Héctor Ramos 6af3b161c0 Run failing tests in CI, without turning CI red (#20775)
Summary:
We have several disabled tests in Circle, and they are not running at all.
This prevents us from seeing when a disabled test might actually be fixed, as enabling the test requires uncommenting the correct line in Circle CI's config.

In this PR, we use the existing swallow_error script to run known-failing steps, without failing the job. This will let us see the step's output in CI, without polluting PRs that have not introduced new failures to CI.
Pull Request resolved: https://github.com/facebook/react-native/pull/20775

Differential Revision: D9442412

Pulled By: hramos

fbshipit-source-id: 83c930811a559fdcf6d7b926b4073343e862d2b3
2018-08-22 12:31:19 -07:00
Héctor Ramos 91bba30312 WIP: Add Node 10 job to workflow
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/19299

Differential Revision: D9413583

Pulled By: hramos

fbshipit-source-id: 61ac48e46feaba5f1ec80362b5e1c7f2787ee167
2018-08-20 17:48:14 -07:00
Héctor Ramos 8e95f72ea5 Disable Podspec tests
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/20755

Differential Revision: D9408317

Pulled By: hramos

fbshipit-source-id: 7799cf8ee4c99662299ef9cf1a26913cdf0d8b39
2018-08-20 14:48:40 -07:00
Héctor Ramos e0465bf8b9 Disable failing tests (#20622)
Summary:
`test_detox_end_to_end` and `test_objc_end_to_end` are both failing on master. This is polluting internal diffs that do not introduce failures.

As we just now started tracking Circle CI on our internal builds, I want to make sure we only nag internal diffs when the failure can actually be attributed to the diff. The failures in the e2e tests precede the Circle CI integration and are adding unnecessary noise.

Going forward, we will immediately go back to a diff and push the author to fix the broken CI, so this PR is a temporary fix.
Pull Request resolved: https://github.com/facebook/react-native/pull/20622

Differential Revision: D9272360

Pulled By: hramos

fbshipit-source-id: 2f8d22e35d301aa7eb67ed08f6deed21bf971acd
2018-08-10 14:02:10 -07:00
Héctor Ramos fb223e7675 Consolidate e2e steps and run Detox tests before e2e (#20550)
Summary:
Run Detox before the flaky e2e iOS tests in order to get better signal.
Pull Request resolved: https://github.com/facebook/react-native/pull/20550

Differential Revision: D9183655

Pulled By: hramos

fbshipit-source-id: e499daad86249961cd6d0b8fc22c846392622056
2018-08-06 13:02:58 -07:00
Héctor Ramos 0541c7b5f4 Run deploys to npm whenever a new tag is pushed to a stable branch (#19742)
Summary:
This has been tested in `0.56-stable` and was used to deploy the `0.56.0-rc.2` release.
Pull Request resolved: https://github.com/facebook/react-native/pull/19742

Differential Revision: D9071349

Pulled By: hramos

fbshipit-source-id: 6bccbe4a56cb080bd7d75c1f622168e462fb4c86
2018-07-30 15:31:38 -07:00
Rotem M 7f0a4f72b4 Initial Detox E2E iOS configuration to be run on RNTester (#20235)
Summary:
This PR adds initial setup for Detox E2E iOS and some tests for ButtonExample.
Pull Request resolved: https://github.com/facebook/react-native/pull/20235

Reviewed By: hramos

Differential Revision: D8924525

Pulled By: TheSavior

fbshipit-source-id: 8117fc1559c2e9cb831f7b081aa8f4ddc8ba7401
2018-07-30 14:31:24 -07:00
Dulmandakh 6117a6c720 Bump Android NDK to r17b (#20357)
Summary:
This PR bumps Android NDK version to r17b (latest). Cleaned up redundant **LOCAL_EXPORT_CPPFLAGS** rules in .mk files
Pull Request resolved: https://github.com/facebook/react-native/pull/20357

Differential Revision: D9068424

Pulled By: hramos

fbshipit-source-id: 8578637e38e807288b819a36cb75ea9feefcc09f
2018-07-30 14:02:11 -07:00
Héctor Ramos 8116c3f91a Fix Android apt-get step failure
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/20373

Differential Revision: D8976675

Pulled By: hramos

fbshipit-source-id: 5b46e5325fe546f091173153de0428bbef9f53da
2018-07-24 11:49:36 -07:00
Héctor Ramos 6da5779eb7 Remove pull request check on npm deploys (#19856)
Summary:
The publish script will fail on forked PRs anyway as the $CIRCLE_NPM_TOKEN envvar will be missing or incorrect.

We also move buck fetches to their own own shell script. These are shared by the Android and Deploy jobs, and using -ex will allow us to see which specific command failed without the need to list all steps in the config file.

Finally, cache keys are updated as architecture is only relevant in caches that may be reused across macOS and linux, which is not the case for Android.
Pull Request resolved: https://github.com/facebook/react-native/pull/19856

Differential Revision: D8956879

Pulled By: hramos

fbshipit-source-id: cfc360b9c603497fee53433471537bdc15a0a1c8
2018-07-23 13:33:28 -07:00
gengjiawen 7b1bd4d4f3 remove useless config in circle ci (#19980)
Summary:
The gradle path is unnecessary.
pass all current ci.
none
 [GENERAL] [INTERNAL] [CI] - remove useless config in circle ci.
Closes https://github.com/facebook/react-native/pull/19980

Differential Revision: D8700298

Pulled By: hramos

fbshipit-source-id: ed50cab035f0d78dc482023460692a2ce137fb48
2018-06-29 13:02:58 -07:00
Héctor Ramos 86fb5213ae Bump Buck to v2018.06.25.01 (#19882)
Summary:
Fixes #19881
Closes https://github.com/facebook/react-native/pull/19882

Differential Revision: D8627994

Pulled By: hramos

fbshipit-source-id: ae43f2dd8dd5fac88590eeb4dddb18ebe5085359
2018-06-25 17:17:25 -07:00
Héctor Ramos 15f84420f0 Enable CocoaPods tests, add parallelism (#19764)
Summary:
Enable CocoaPods test, iOS e2e.
Use parallelism to run several tests simultaneously within the same machine.

Circle CI
Closes https://github.com/facebook/react-native/pull/19764

Differential Revision: D8471955

Pulled By: hramos

fbshipit-source-id: c484fd6c66fb2d0d2305ced29e34cb305f73fb55
2018-06-16 15:55:49 -07:00
Dulmandakh 9e4a4323b1 limit ndk jobs for RNTester on CI (#19755)
Summary:
Limit number of NDK jobs of ReactAndroid on CI using $BUILD_THREADS environment variable. Otherwise, it was spawning 32 jobs while building RNTester, which caused in OOM or unexpected failure.

CI: https://circleci.com/gh/dulmandakh/react-native/387

Android CI is green again 😍
Closes https://github.com/facebook/react-native/pull/19755

Differential Revision: D8466069

Pulled By: hramos

fbshipit-source-id: fd507d12c8e93f718e047719daa68aa25c37bfb2
2018-06-16 01:31:32 -07:00
Héctor Ramos 3f29d2c440 Skip metro bump commits (#19680)
Summary:
New metro releases are published to npm when a "Bump metro" commit is synced to GitHub and picked up by facebook/metro's Circle CI.
The same commit is picked up by facebook/react-native's Circle CI, but it will fail the checkout job because yarn will not find the new package on npm.
This is expected because the package will only be published to npm after Circle CI is done running on facebook/metro.

We can safely skip `yarn install` on these commits, and rely on the restored yarn cache instead.
Closes https://github.com/facebook/react-native/pull/19680

Differential Revision: D8450638

Pulled By: hramos

fbshipit-source-id: 436c229d09bfb4f9f92236c5aeec4a60d8317922
2018-06-15 11:47:40 -07:00
gengjiawen 8200c98029 add RNTester to ci (#19673)
Summary:
* Current ci is missing an important part to test the whole part. With this we can make sure the js and android part compiles.
* Ensure the current android proguard rules is okay.

The `my-release-key.keystore` is just a copy of debug.keystore in `react-native/keystores`.
Pass all ci.
none
 [GENERAL] [ENHANCEMENT] [CI] - Add RNTester to ci
Closes https://github.com/facebook/react-native/pull/19673

Differential Revision: D8435419

Pulled By: hramos

fbshipit-source-id: d3d92a5d1b8477c1f298643cc96695769e5c93ea
2018-06-14 18:30:54 -07:00
Héctor Ramos 0858300f74 Publish releases automatically, update docs (#19715)
Summary:
Now that tests are green, we can return to automatic publishing to npm based on git tags. As long as all tests are passing, deploying a new release of React Native is as easy as tagging a commit. I've updated `Releases.md` to reflect today's release process.

Future Work: Include information about updating the website, as this is no longer done automatically.
Closes https://github.com/facebook/react-native/pull/19715

Differential Revision: D8429834

Pulled By: hramos

fbshipit-source-id: 2c6f2c80ac43c4e6d20c01e06ba14a7e4b16180d
2018-06-14 14:01:51 -07:00
Héctor Ramos e315ec9891 Fix iOS e2e tests: bump react-native-babel-preset to ^5 (#19625)
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
2018-06-10 17:08:56 -07:00
Joshua Wang c55bcd6ea7 have circle ci use xcode 9.4 (#19629)
Summary:
Circle CI just released Xcode 9.4 https://discuss.circleci.com/t/xcode-9-4-availability-on-circleci/22648/5

Make sure react native still works with Xcode 9.4.

None

[IOS][MINOR] Upgrade CI
Closes https://github.com/facebook/react-native/pull/19629

Differential Revision: D8343236

Pulled By: hramos

fbshipit-source-id: 2266aeafc9a1b1c77ad842f06c9a137bb05b135d
2018-06-09 00:51:19 -07:00
Héctor Ramos 9cc14ec99c Update Danger token (#19606)
Summary:
Trivial.
Closes https://github.com/facebook/react-native/pull/19606

Differential Revision: D8314419

Pulled By: hramos

fbshipit-source-id: b298e265c2c87cdc01175b1a014f9003e0673f40
2018-06-07 07:34:25 -07:00
Héctor Ramos 1324e7b558 Bump to BUCK v2018.03.26.01
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
2018-06-01 13:49:30 -07:00
Héctor Ramos dcfe4ef26f Enable webhooks on Circle
Summary:
Release Notes
=============

[INTERNAL][MINOR][CircleCI] - Send webhooks to Facebook.
Closes https://github.com/facebook/react-native/pull/19527

Differential Revision: D8228361

Pulled By: hramos

fbshipit-source-id: 5d7c0960392b9a860d3f665e2a316c18153879eb
2018-05-31 14:52:14 -07:00
Dulmandakh 0bbac18cf0 circle ci: yarn cache uses package.json checksum as a key
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
2018-05-23 13:58:16 -07:00
Héctor Ramos 3e0ebc7663 Revert bump to API 26 and fix Android tests failures
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
2018-05-23 13:06:12 -07:00
Héctor Ramos 1e8a45f206 Remove checksum fallbacks to ensure clean installs
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
2018-05-16 20:16:59 -07:00
Héctor Ramos 8c74864d7b Update Android packages cache key
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
2018-05-16 08:57:01 -07:00
Héctor Ramos 2472d915ab Consolidate CI/local test scripts
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
2018-05-15 17:27:52 -07:00
Héctor Ramos 1ad8351d9b Clear apt cache
Summary:
This will unblock test_android on CI.
Closes https://github.com/facebook/react-native/pull/19275

Differential Revision: D8020049

Pulled By: hramos

fbshipit-source-id: 9d738a636f63138aae918759e879f9e397c11aca
2018-05-15 17:27:52 -07:00
Héctor Ramos c1e6f27823 Bump to Node 8
Summary:
Moving to Node 8 in React Native will allow us to be consistent with Facebook, e.g. trailing commas.

As of April 30, Node 4.x is end of life, and Node 6.x entered maintenance mode (see https://medium.com/the-node-js-collection/april-2018-release-updates-from-the-node-js-project-71687e1f7742).

This will require our docs to be updated to require Node 8 as a minimum. This should be done as part of the following PR: https://github.com/facebook/react-native-website/pull/355

Circle CI already runs all JS tests using Node 8, and it has an extra compatibility check that uses Node 6. This workflow is dropped as we no longer need to check for failures when Node 6 is used.

See https://github.com/facebook/react-native/issues/19226

[GENERAL] [BREAKING] [Node] - Bump minimum req. Node version to 8
Closes https://github.com/facebook/react-native/pull/19230

Differential Revision: D7979478

Pulled By: hramos

fbshipit-source-id: c91ec118f0a59c4daae5fcdbfc822ccead591304
2018-05-11 17:32:19 -07:00
Chirag Jain 15f8d7013c CI: fix watchman install errors and update ios simulators to version 11.2
Summary:
Fixes watchman install errors.

Check that iphone 5s is booted properly on circle. Check brew install watchman succeeds.

[CI] - Fix ios version on circleci and fixes brew install watchman error
Closes https://github.com/facebook/react-native/pull/19166

Differential Revision: D7899295

Pulled By: hramos

fbshipit-source-id: 2260a2675879cf97fb0b2f11139d9bb84ce7444e
2018-05-07 14:30:32 -07:00
Héctor Ramos b531612b2c Collect unit test results in test_android job
Summary:
Explicitly generate a XML file with unit test results, and convert this file to JUnit format for display in Circle.

Run in Circle: https://circleci.com/gh/hramos/react-native/1869

![screen shot 2018-03-28 at 12 07 15 pm](https://user-images.githubusercontent.com/165856/38050644-9712b6c6-3280-11e8-953c-a2eb722edf39.png)

[INTERNAL] [MINOR] [.circleci] - Collect, process, and display Android unit test results on Circle
Closes https://github.com/facebook/react-native/pull/18608

Differential Revision: D7433151

Pulled By: hramos

fbshipit-source-id: 7c18b552d7790b238b4c2a720fb316dff8fd7ec3
2018-03-28 13:22:58 -07:00
Héctor Ramos 15b25d854a Cache C++ downloads
Summary: Closes https://github.com/facebook/react-native/pull/18595

Differential Revision: D7419532

Pulled By: hramos

fbshipit-source-id: 0b64763f91efea8300c4cde4703e8496dbda8c49
2018-03-27 14:33:24 -07:00
Héctor Ramos de1040fcff Cache apt dependencies in test_android
Summary: Closes https://github.com/facebook/react-native/pull/18576

Differential Revision: D7415216

Pulled By: hramos

fbshipit-source-id: 9b7199fe5fb91a26ba0881e426a85395b2923f26
2018-03-27 09:28:32 -07:00
Héctor Ramos 6f588b31be Fix Android job
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
2018-03-16 18:56:08 -07:00
Héctor Ramos 6f6084db69 Explicitly set path to yarn
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
2018-03-16 17:22:05 -07:00
Héctor Ramos 1ff1e573f1 Add existing Android checks to Circle.
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
2018-03-09 17:24:19 -08:00
Héctor Ramos c9d756285a Clear cache to resolve iOS, tvOS workflow
Summary:
tvOS and iOS workflows were flaky, apparently due to a stale cache that contained a problematic version of the Metro dependency. Thanks to motiz88 for identifying the potential cause of flakiness in https://github.com/react-native-community/react-native-releases/issues/2#issuecomment-371905315.

https://circleci.com/workflow-run/440180a2-e888-4f27-bec9-b8e5d9be6708

[GENERAL] [MINOR] [CI] - Resolve iOS, tvOS failures in Circle
Closes https://github.com/facebook/react-native/pull/18304

Differential Revision: D7220150

Pulled By: hramos

fbshipit-source-id: 0f5e68c779dfce44e6deb8b813a3ac9e25a2ab97
2018-03-09 15:11:46 -08:00
Héctor Ramos 498cf7e2d7 Reënable iOS and tvOS tests
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
2018-03-04 18:15:57 -08:00
Héctor Ramos b181b7797f Check PATENTS does not creep into files
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
2018-03-01 08:22:05 -08:00
Héctor Ramos 1346bf8405 Timeout Android instrumentation steps
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
2018-02-27 13:09:55 -08:00
Héctor Ramos c87d03a8b2 Update danger token
Summary: Closes https://github.com/facebook/react-native/pull/18111

Differential Revision: D7099636

Pulled By: hramos

fbshipit-source-id: fc95ba83c34e0061c13fb831ea3496d7e8f3793a
2018-02-27 10:01:40 -08:00
Héctor Ramos 617362b6f7 Bump buck to v2018.02.16.01
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
2018-02-16 13:37:28 -08:00
Héctor Ramos cc6d0937c3 Add disabled tests to CircleCI config
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
2018-02-13 08:16:51 -08:00
Mike Grabowski f7729a5933 Broken publish step on CI
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
2018-02-12 12:33:42 -08:00
Héctor Ramos 51b6749c07 bump Android cache key
Summary: Closes https://github.com/facebook/react-native/pull/17934

Differential Revision: D6956755

Pulled By: hramos

fbshipit-source-id: 518171156638effc279f17b38c379e029ed23ba0
2018-02-09 17:31:14 -08:00
Héctor Ramos 2ef9b7f2da Checkout code prior to deploy
Summary: Closes https://github.com/facebook/react-native/pull/17917

Differential Revision: D6944553

Pulled By: hramos

fbshipit-source-id: 013f5e75bd61d939fe650729c9c388a78bede330
2018-02-08 17:17:56 -08:00
Héctor Ramos 40b17926bb Move approval to separate deploy workflow
Summary: Closes https://github.com/facebook/react-native/pull/17916

Differential Revision: D6943605

Pulled By: hramos

fbshipit-source-id: 0e86f01aa38c15e5bc179c5e517f079eb34d495f
2018-02-08 15:53:41 -08:00
Héctor Ramos 4f078d3fe2 Consolidate checkout and yarn steps
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
2018-02-08 15:20:09 -08:00
Héctor Ramos 2f02dd4c8c Revert PR #17312 due to buck failures in continuous integration tests
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
2018-02-08 07:38:37 -08:00
Héctor Ramos fa11faecb6 Switch e2e to yarn
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
2018-02-06 13:04:50 -08:00