Add codecov

This commit is contained in:
Alex Demchenko
2020-01-21 15:57:45 +01:00
parent 4b8bc8db37
commit 7200eff160
4 changed files with 29 additions and 3 deletions

View File

@@ -2,7 +2,9 @@
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
version: 2.1
orbs:
codecov: codecov/codecov@1.0.5
jobs:
build:
docker:
@@ -33,5 +35,10 @@ jobs:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
- run: yarn run check
# run tests!
- run: yarn test
- codecov/upload:
file: ./coverage/lcov.info

3
.gitignore vendored
View File

@@ -68,3 +68,6 @@ lib/
# Type coverage
.type-coverage/
# Tests coverage
coverage/

View File

@@ -1,4 +1,5 @@
# React Native Flyer UI
[![CircleCI](https://circleci.com/gh/flyerhq/react-native-flyer-ui.svg?style=shield)](https://circleci.com/gh/flyerhq/react-native-flyer-ui)
[![type-coverage](https://img.shields.io/badge/dynamic/json.svg?label=type-coverage&prefix=%E2%89%A5&suffix=%&query=$.typeCoverage.atLeast&uri=https%3A%2F%2Fraw.githubusercontent.com%2Fflyerhq%2Freact-native-flyer-ui%2Fdevelop%2Fpackage.json)](https://github.com/plantain-00/type-coverage)
[![codecov](https://codecov.io/gh/flyerhq/react-native-flyer-ui/branch/develop/graph/badge.svg)](https://codecov.io/gh/flyerhq/react-native-flyer-ui)
[![type-coverage](https://img.shields.io/badge/dynamic/json.svg?label=type-coverage&suffix=%&query=$.typeCoverage.atLeast&uri=https%3A%2F%2Fraw.githubusercontent.com%2Fflyerhq%2Freact-native-flyer-ui%2Fdevelop%2Fpackage.json)](https://github.com/plantain-00/type-coverage)

View File

@@ -49,7 +49,22 @@
"jsx",
"json",
"node"
]
],
"collectCoverage": true,
"collectCoverageFrom": [
"src/**/*.{ts,tsx}",
"!**/index.{ts,tsx}",
"!**/styles.{ts,tsx}",
"!**/*.d.ts"
],
"coverageThreshold": {
"global": {
"branches": 100,
"functions": 100,
"lines": 100,
"statements": 100
}
}
},
"typeCoverage": {
"atLeast": 100