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
This commit is contained in:
Héctor Ramos
2018-11-30 19:45:56 -08:00
committed by Facebook Github Bot
parent 0f3be77b7d
commit 69e9c9d371
3 changed files with 204 additions and 144 deletions

View File

@@ -88,7 +88,17 @@
"denodeify",
"fbjs"
],
"testEnvironment": "node"
"testEnvironment": "node",
"collectCoverageFrom": [
"Libraries/**/*.js",
"local-cli/**/*.js"
],
"coveragePathIgnorePatterns": [
"/__tests__/",
"/vendor/",
"<rootDir>/Libraries/react-native/",
"<rootDir>/local-cli/templates/"
]
},
"main": "Libraries/react-native/react-native-implementation.js",
"files": [
@@ -212,6 +222,7 @@
"babel-eslint": "9.0.0",
"babel-generator": "^6.26.0",
"detox": "9.0.4",
"coveralls": "^3.0.2",
"eslint": "5.1.0",
"eslint-config-fb-strict": "22.1.0",
"eslint-config-fbjs": "2.0.1",