Commit Graph

70 Commits

Author SHA1 Message Date
Konstantin Raev b824722501 Fixed nvm for travis CI
Summary:
NVM started failing on Travis
Closes https://github.com/facebook/react-native/pull/7411

Differential Revision: D3265199

fb-gh-sync-id: 6c80210cafb0ec6510073ce913a36eb7edcac2c6
fbshipit-source-id: 6c80210cafb0ec6510073ce913a36eb7edcac2c6
2016-05-05 11:25:28 -07:00
Konstantin Raev a8d2079022 Optimise e2e tests retries
Summary:Implemented smarter retries for e2e tests

E2e tests consist of two expensive and flaky steps: npm installation and tests execution.
Our CI is configured to retry a command 3 times before terminating the test.
In current setup if one of the steps fail the whole test is restarted.

This change adds ad-hoc ability to retry flaky bits of e2e script independently.
This will make tests fail faster when code gets broken while increasing the chances to succeed in case of random false errors.
Closes https://github.com/facebook/react-native/pull/7184

Differential Revision: D3218927

fb-gh-sync-id: 9be8343484bb28aa3601b651db70fc55aa840e61
fbshipit-source-id: 9be8343484bb28aa3601b651db70fc55aa840e61
2016-04-25 07:16:20 -07:00
James Ide 6fac6db4d4 Use xcodebuild and delete "Framework Search Paths" for Xcode 7.3 to un-stall the tests
Summary:The Obj-C tests were stalling when we updated TravisCI to use the OS X image with Xcode 7.3 and iOS 9.3.

On my own MBP with Xcode 7.3 the tests stall as well. Running `./scripts/objc-test.sh` prints out a warning near the end, which says `ld` couldn't find a Frameworks folder under the iPhoneSimulator9.3 SDK directory. Indeed, this directory doesn't exist on my computer. When creating a brand new project with unit tests and UI tests, both test targets don't specify "Framework Search Paths" so I don't think we need to specify it anymore.
Closes https://github.com/facebook/react-native/pull/7168

Differential Revision: D3216524

fb-gh-sync-id: 3097bda98d78289ecdba86801bcd461f3311ac47
fbshipit-source-id: 3097bda98d78289ecdba86801bcd461f3311ac47
2016-04-22 23:04:19 -07:00
Ben Alpert 6e7b00508e Update to Xcode 7.3 on Travis
Summary:Hopefully this will fix https://travis-ci.org/facebook/react-native/jobs/123444671.
Closes https://github.com/facebook/react-native/pull/7008

Differential Revision: D3188875

fb-gh-sync-id: 18d5870437b72fa28502fefd5431b0bb9184b956
fbshipit-source-id: 18d5870437b72fa28502fefd5431b0bb9184b956
2016-04-16 01:25:23 -07:00
Konstantin Raev f9bd789206 E2e android
Summary:- converted shell script `scripts/e2e-test.sh` into JS script to have more programming flexibility
- using appium execute 2 tests after a fresh React Native app installation: check HMR and that debugging mode does not crash the app
- made sure tests can be stable on limited CI systems and added ways to debug any problems in the future

Using appium we can now interact with Android app and test its state.
As a follow up i am planning to write a blog post on how to use appium with android and ios for e2e testing.
Closes https://github.com/facebook/react-native/pull/6840

Differential Revision: D3173635

Pulled By: mkonicek

fb-gh-sync-id: 3cf044bc9f64d1a842ae4589dd1bcab76de3d66a
fbshipit-source-id: 3cf044bc9f64d1a842ae4589dd1bcab76de3d66a
2016-04-13 08:20:05 -07:00
James Ide 29a1a05cbb Re-order the TravisCI test matrix based on historical run times
Summary:Travis CI runs the test matrix in the order specified in the YAML file. When there are enough available test VMs this doesn't matter since all matrix entries run in parallel, but we often don't have enough free VMs. So when there's a free VM, start running the slowest tests first. This way as more VMs become free, they will run the faster tests and can catch up. This should minimize the time required for a PR to turn green.
Closes https://github.com/facebook/react-native/pull/6828

Differential Revision: D3144236

fb-gh-sync-id: 1a3242767f02469b0384bb871d6c4c1e505aa442
fbshipit-source-id: 1a3242767f02469b0384bb871d6c4c1e505aa442
2016-04-06 03:43:22 -07:00
Martin Konicek 7be18819ec Retry e2e test consistently
Summary:Travis tests have been flaky recently:
https://travis-ci.org/facebook/react-native/builds

Clicking through the last 10 failures, 8 of them are caused by the `npm install` flakiness in the `./e2e-test.sh --packager`. This test works in a very similar way to the iOS e2e test which we retry (see line 18). Let's be consistent.

All the random errors are 404s during `npm install` through Sinopia:

![screen shot 2016-03-23 at 10 33 39 am](https://cloud.githubusercontent.com/assets/346214/13982618/07f338f2-f0e3-11e5-97ad-e887cb46bede.png)

JS tests are more stable (saw 1 random failure but likely the test can be fixed), let's not retry them just yet:

![screen shot 2016-03-23 at 10 33 27 am](https://cloud.githubusercontent.com/assets/346214/13982648/26f46820-f0e3-11e5-8d56-c770549b9275.png)

**Test plan (required)**

Travis tests on this pull request.
Closes https://github.com/facebook/react-native/pull/6604

Differential Revision: D3087044

fb-gh-sync-id: a5c74e2578617656c67fd4d05d4f60ffe63a5e2a
shipit-source-id: a5c74e2578617656c67fd4d05d4f60ffe63a5e2a
2016-03-23 04:24:25 -07:00
Konstantin Raev da5596c97d fixed flow error on Travis
Summary: Closes https://github.com/facebook/react-native/pull/6530

Differential Revision: D3071277

fb-gh-sync-id: e2cfd2d2a8cbf5a862dcdb79fe834b1fdbcba107
shipit-source-id: e2cfd2d2a8cbf5a862dcdb79fe834b1fdbcba107
2016-03-19 02:15:24 -07:00
Konstantin Raev 84183ffc30 Improved OSS flow and lint reporting
Summary:- lint bot is now managed by Circle CI
- checked that flow and lint errors are caught both by bot and CI
- flow fix for npm 3
- Travis is now using npm 2 and Circle CI npm 3
- Refactored Travis script to be able to be able to fail on multiple lines
Closes https://github.com/facebook/react-native/pull/6508

Differential Revision: D3069500

Pulled By: davidaurelio

fb-gh-sync-id: 02772bf1eae5f2c44489c2e3a01899428a9640cb
shipit-source-id: 02772bf1eae5f2c44489c2e3a01899428a9640cb
2016-03-18 08:10:26 -07:00
Konstantin Raev a611ec5f23 Added e2e tests for npm@2 and npm@3
Summary:Need to make sure we can use both versions of npm client for publishing and installing

**Test plan (required)**

Make sure tests pass on both Travis and Circle CI.
Closes https://github.com/facebook/react-native/pull/6364

Differential Revision: D3036537

fb-gh-sync-id: a3c1ea16f0aeb7b1327574b511aac7594fd3d7e6
shipit-source-id: a3c1ea16f0aeb7b1327574b511aac7594fd3d7e6
2016-03-10 11:59:25 -08:00
Martin Konicek 44997b47e2 Skeleton for running Android e2e or a separate packager e2e test
Summary:The e2e-test.sh currently only supports iOS. Most of the script will be identical for Android,
let's therefore reuse it. This diff adds one argument: --ios, --android or --packager.

`--packager` starts the packager and checks it produces a bundle. The idea is to run this
on CircleCI even before we implement the actual Android e2e test in order to reliably catch
breakages to package.json quickly.

We should only land this once Travis is green again.

**Test plan**

Ran:

    git checkout master
    ./scripts/e2e-test.sh  # Error message about required argument was printed
    ./scripts/e2e-test.sh --ios       # Ran the test as before (all the way up to xctool which I don't have locally)
    ./scripts/e2e-test.sh --android   # Message was printed
    ./scripts/e2e-test.sh --packager  # The packager created the bundle, exit code was 0
    # Made the packager fails on bad JS
    ./scripts/e2e-test.sh --packager  # Exit code was 1
Closes https://github.com/facebook/react-native/pull/6279

Differential Revision: D3007281

fb-gh-sync-id: 6ece06b933001ba0939806c69ed7c7471b134931
shipit-source-id: 6ece06b933001ba0939806c69ed7c7471b134931
2016-03-03 12:43:29 -08:00
Konstantin Raev a48db5c563 added bestander for notifications of travis ci status changes
Summary:for tracking Travis stability
Closes https://github.com/facebook/react-native/pull/6277

Differential Revision: D3006229

fb-gh-sync-id: 31266cb3b73d57946cfd1518365f465642f0173a
shipit-source-id: 31266cb3b73d57946cfd1518365f465642f0173a
2016-03-03 09:51:32 -08:00
Satyajit Sahoo 36f1961003 Use flow-bin to typecheck locally, update ESLint to 2.0
Summary:Using local version of the Flow make it easy to have project specific version instead of relying on the user to have the correct version installed globally. For example, React Native uses an older version of Flow, while I have the latest version installed. Now I cannot typecheck the code because my version doesn't match the `.flowconfig`.

**Test plan (required)**

Run `npm run lint` and `npm run flow` to run `eslint` and `flow`.

cc bestander mkonicek
Closes https://github.com/facebook/react-native/pull/6145

Reviewed By: dmmiller

Differential Revision: D2976616

Pulled By: bestander

fb-gh-sync-id: bb08f6f8ceb09f644ec1d45c40b4cb7a9d3cfef5
shipit-source-id: bb08f6f8ceb09f644ec1d45c40b4cb7a9d3cfef5
2016-03-03 04:15:59 -08:00
Konstantin Raev 854c5ddf16 Simplified Travis configuration
Summary:Merged Travis js tests into one test run.

This should simplify test runs, reduce chances of external infra failures and make CI reports more focused.

**Test plan (required)**

See how travis runs it.
Need to double check that APPETIZE_TOKEN and S3_TOKEN aren't used.
Closes https://github.com/facebook/react-native/pull/6172

Differential Revision: D3001437

fb-gh-sync-id: 203e18ce0706d4ab1ab55cfe016beed3e3558dcc
shipit-source-id: 203e18ce0706d4ab1ab55cfe016beed3e3558dcc
2016-03-02 15:25:32 -08:00
Konstantin Raev 3e52df8c2a Using an updated version of Sinopia that works with node 4&5
Differential Revision: D2939188

fb-gh-sync-id: 0189d820c818df249ed26dbeb0d2d6e1d43c82b1
shipit-source-id: 0189d820c818df249ed26dbeb0d2d6e1d43c82b1
2016-02-16 10:57:08 -08:00
Konstantin Raev 6f1417c849 CI now builds docs website and deploys it to /%version% path
Summary:
Copy of #5760 reverted merge.

We need to preserve history of docs changes on the webserver.
The goal is to allow users to browse outdated versions of docs.
To make things simple all websites will be released to https://facebook.github.io/react-native/releases/version/XX folder when there is a branch cut.

I switched from Travis CI to Cirle CI because it works faster and I am more familiar with it.

How it works:

1. If code is pushed to `master` branch then CI will build a fresh version of docs and put it in https://github.com/facebook/react-native/tree/gh-pages/releases/next folder.
Github will serve this website from https://facebook.github.io/react-native/releases/version/next URL.
All relative URLs will work within that website

2. If code is pushed to `0.20-stable` branch then CI will build a fresh version of docs and put it in https://github.com/facebook/react-native/tree/gh-pages/releases/0.20 folder.
Github will serve this website from https://facebook.github.io/react-native/releases/v
Closes https://github.com/facebook/react-native/pull/5873

Reviewed By: svcscm

Differential Revision: D2926901

Pulled By: androidtrunkagent

fb-gh-sync-id: 16aea430bac815933d9c603f03921cc6353906f1
shipit-source-id: 16aea430bac815933d9c603f03921cc6353906f1
2016-02-11 06:17:42 -08:00
Konstantin Raev d7f787665c Added .travis.yml to fbsource to support github PR with it
Reviewed By: mkonicek

Differential Revision: D2921590

fb-gh-sync-id: 714813270268e5b83e7068f3fe12ee442cd2eb69
shipit-source-id: 714813270268e5b83e7068f3fe12ee442cd2eb69
2016-02-10 07:07:09 -08:00
Konstantin Raev 152f1ee58c removed temporarilty .travis.yml
It will be synced from fbsource in an hour
2016-02-10 14:21:06 +00:00
Pieter De Baets adfc573a75 Move tests to iOS9.2 2016-01-06 17:12:02 +00:00
James Ide 84adb6c8cc [Node 5] Run Travis CI tests with Node 5 and npm 3
Updates the Travis CI environment to install Node 5.
2016-01-04 15:57:38 -08:00
Christopher Chedeau d1e5fb8144 Update .travis.yml 2015-12-23 10:29:43 -08:00
Christopher Chedeau 402fd06725 Introduce code-analysis bot 2015-12-11 08:44:12 -08:00
Felix Oghină 63a82c40ac Revert "[releng] build 0.14-stable on travis"
This reverts commit a632c5723c.
2015-11-05 15:07:47 -08:00
Felix Oghină a632c5723c [releng] build 0.14-stable on travis 2015-11-05 15:06:52 -08:00
Felix Oghină 767243bd54 [travis] build stable branches 2015-11-05 14:27:12 -08:00
Christopher Chedeau dfee3f30af Adding s3 token to travis environment 2015-10-14 14:54:02 -07:00
Christopher Chedeau 6ab4faa68b Add appetize.io token to travis environment
$APPETIZE_TOKEN is now available
2015-10-14 14:46:31 -07:00
Felix Oghină 2dcb06949a [cli] use different names in generator tests 2015-09-24 13:54:01 +01:00
James Ide 03c874cb7f [Tests] Move the packager and cli tests to separate matrix entries
The packager and cli tests now run independently of the RN JS tests. When the packager moves to its own repo we can just remove the packager entry from .travis.yml.

The cli tests are also marked as allowed to fail for now.
2015-09-23 14:14:29 -07:00
James Ide 8a77aa60c3 [Travis] Use Xcode 7 image, remove brew update, install nvm directly
- Uses the Xcode 7 image
- The new image includes xctool 0.2.5 (current)
- Removes the `brew update` command, which needed to fetch a lot of data
- Disables the npm spinner before installing flow-bin
- Uses `$TMPDIR` instead of spinning up Node
2015-09-22 22:41:12 -07:00
James Ide fb59425262 [Node 4] Update .travis.yml to install Node 4.x + upgrade jest
Jest 0.5.2 ships with a fix for bound functions, which RN exercises. And with this Travis change, the automated tests will install Node 4.x with nvm before running.

Test Plan:`nvm use 4 && npm i && npm test`
See if Travis tests pass.
2015-09-15 13:59:03 -07:00
James Ide 1b0da33b47 [Travis] Update CI to run with Xcode 6.4
Use Xcode 6.4 instead of Travis' beta support for 6.3.
2015-09-04 02:39:37 -07:00
James Ide 514efd17d3 [npm] Update to stacktrace-parser@0.1.3 and ws@0.8.0 to satisfy io.js 3 / Node 4
The previous version of stacktrace-parser 0.1.2 had an line in its package.json file that required Node <= 2.x. That line was removed, so it no longer warns on io.js 3.x or Node 4.x.

Similarly, ws 0.8.0 was published with support for the new V8, so it compiles with io.js 3.x and therefore should work with Node 4.x.

Updated the Travis file as well to run on io.js 3.x.

Test Plan:
```
$ nvm use iojs-v3
Now using io.js v3.1.0 (npm v2.13.3)

$ npm i
<no compiler errors>
```
2015-09-01 14:09:47 -07:00
James Ide f8f68176d5 [Travis] Put $PWD in front of nvm (fixes npm install)
There was a problem where NVM_DIR wasn't correctly configured, which meant that `npm install` was using whatever version of Node was on the system (0.12 in this case) despite having run `nvm use iojs-v2`. Fixing up NVM_DIR fixes the `npm install` errors and builds the native npm packages for the right version of Node.
2015-08-21 11:37:11 -07:00
Tadeu Zagallo 12492d8d94 [ReactNative][Travis] Attempt to fix tests 2015-08-13 14:39:01 +01:00
Christopher Chedeau 5ebe0ed717 Bust jest caching and fix tests 2015-08-11 11:02:19 -07:00
Christopher Chedeau c627600ef3 Try to fix flow 2015-07-30 13:24:14 -07:00
James Ide 212bd2250c [Tests] Update tests to run on io.js with the latest version of jest
Updates the tests in small ways so they run on io.js with some updates:

 - The Cache test which relies on Promises uses `runAllImmediates` for modern versions of Node because bluebird uses `setImmediate` instead of `process.nextTick` for Node >0.10.

Test Plan: Run `npm test` with the latest version of jest.
2015-07-01 11:38:17 -07:00
Tadeu Zagallo 8976a05fe1 [ReactNative][Travis] Use nvm with node v0.10 2015-05-30 02:16:51 +01:00
Tadeu Zagallo 74c337f770 [ReactNative] Use Travis' Xcode 6.3 beta 2015-05-29 23:42:03 +01:00
Christopher Chedeau 50a58e108a Turns out, travis doesn't support 8.3, reverting to 8.1 :( 2015-05-13 16:50:13 -07:00
Christopher Chedeau 4b1f01ada2 Only use iphonesdk8.3 2015-05-13 16:43:31 -07:00
Christopher Chedeau fcf5cc3981 Add specific xcode sdk to travis.yml 2015-05-13 16:38:41 -07:00
Alex Kotliarskyi aaaca7fa2d Disable watchman on Travis 2015-05-04 11:53:07 -07:00
Alex Kotliarskyi 5d5ec80452 Fix tests runner 2015-04-22 16:04:06 -07:00
Christopher Chedeau 217f50fa38 Fix travis.yml typo 2015-04-16 15:25:17 -07:00
Alex Kotliarskyi 52a268007b Use iPhone8.1 for e2e tests 2015-04-10 19:20:48 -07:00
Alex Kotliarskyi 80102c56cf Add end-to-end test 2015-04-10 19:11:46 -07:00
Ben Alpert 2e44754c9d Merge pull request #647 from spicyj/flow-travis
Run flow on Travis
2015-04-03 09:48:40 -07:00
Ben Alpert e4e3cb29e5 Run flow on Travis 2015-04-03 09:43:59 -07:00