Skip to content

Commit 1eb659c

Browse files
authored
Enhancement/codecov (#295)
* ✨ add CI config for coverage reports using CodeCov
1 parent 95a9292 commit 1eb659c

File tree

3 files changed

+83
-3
lines changed

3 files changed

+83
-3
lines changed

codecov.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
codecov:
2+
notify:
3+
require_ci_to_pass: yes
4+
5+
coverage:
6+
precision: 2
7+
round: down
8+
range: "70...100"
9+
10+
status:
11+
project: yes

package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"devDependencies": {
3535
"babel-core": "7.0.0-bridge.0",
3636
"babel-jest": "^24.8.0",
37+
"codecov": "^3.5.0",
3738
"jest": "^24.8.0",
3839
"metro-react-native-babel-preset": "0.51.1",
3940
"react": "^16.8.6",
@@ -43,9 +44,13 @@
4344
},
4445
"jest": {
4546
"preset": "react-native",
46-
"modulePathIgnorePatterns": ["InstabugSample"]
47+
"modulePathIgnorePatterns": [
48+
"InstabugSample"
49+
],
50+
"coverageDirectory": "./coverage/",
51+
"collectCoverage": true
4752
},
4853
"scripts": {
49-
"test": "jest"
54+
"test": "jest && ./node_modules/.bin/codecov"
5055
}
5156
}

yarn.lock

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -979,6 +979,13 @@ acorn@^6.0.1:
979979
resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.1.1.tgz#7d25ae05bb8ad1f9b699108e1094ecd7884adc1f"
980980
integrity sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==
981981

982+
agent-base@^4.1.0:
983+
version "4.2.1"
984+
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9"
985+
integrity sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==
986+
dependencies:
987+
es6-promisify "^5.0.0"
988+
982989
ajv@^6.5.5:
983990
version "6.10.0"
984991
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.0.tgz#90d0d54439da587cd7e843bfb7045f50bd22bdf1"
@@ -1087,6 +1094,11 @@ argparse@^1.0.7:
10871094
dependencies:
10881095
sprintf-js "~1.0.2"
10891096

1097+
argv@^0.0.2:
1098+
version "0.0.2"
1099+
resolved "https://registry.yarnpkg.com/argv/-/argv-0.0.2.tgz#ecbd16f8949b157183711b1bda334f37840185ab"
1100+
integrity sha1-7L0W+JSbFXGDcRsb2jNPN4QBhas=
1101+
10901102
arr-diff@^1.0.1:
10911103
version "1.1.0"
10921104
resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-1.1.0.tgz#687c32758163588fef7de7b36fabe495eb1a399a"
@@ -1582,6 +1594,17 @@ code-point-at@^1.0.0:
15821594
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
15831595
integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=
15841596

1597+
codecov@^3.5.0:
1598+
version "3.5.0"
1599+
resolved "https://registry.yarnpkg.com/codecov/-/codecov-3.5.0.tgz#3d0748932f9cb41e1ad7f21fa346ef1b2b1bed47"
1600+
integrity sha512-/OsWOfIHaQIr7aeZ4pY0UC1PZT6kimoKFOFYFNb6wxo3iw12nRrh+mNGH72rnXxNsq6SGfesVPizm/6Q3XqcFQ==
1601+
dependencies:
1602+
argv "^0.0.2"
1603+
ignore-walk "^3.0.1"
1604+
js-yaml "^3.13.1"
1605+
teeny-request "^3.11.3"
1606+
urlgrey "^0.4.4"
1607+
15851608
collection-visit@^1.0.0:
15861609
version "1.0.0"
15871610
resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0"
@@ -1790,6 +1813,13 @@ [email protected], debug@^2.2.0, debug@^2.3.3:
17901813
dependencies:
17911814
ms "2.0.0"
17921815

1816+
debug@^3.1.0:
1817+
version "3.2.6"
1818+
resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b"
1819+
integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==
1820+
dependencies:
1821+
ms "^2.1.1"
1822+
17931823
debug@^4.1.0, debug@^4.1.1:
17941824
version "4.1.1"
17951825
resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
@@ -1976,6 +2006,18 @@ es-to-primitive@^1.2.0:
19762006
is-date-object "^1.0.1"
19772007
is-symbol "^1.0.2"
19782008

2009+
es6-promise@^4.0.3:
2010+
version "4.2.6"
2011+
resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.6.tgz#b685edd8258886365ea62b57d30de28fadcd974f"
2012+
integrity sha512-aRVgGdnmW2OiySVPUC9e6m+plolMAJKjZnQlCwNSuK5yQ0JN61DZSO1X1Ufd1foqWRAlig0rhduTCHe7sVtK5Q==
2013+
2014+
es6-promisify@^5.0.0:
2015+
version "5.0.0"
2016+
resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203"
2017+
integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=
2018+
dependencies:
2019+
es6-promise "^4.0.3"
2020+
19792021
escape-html@~1.0.3:
19802022
version "1.0.3"
19812023
resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
@@ -2632,6 +2674,14 @@ http-signature@~1.2.0:
26322674
jsprim "^1.2.2"
26332675
sshpk "^1.7.0"
26342676

2677+
https-proxy-agent@^2.2.1:
2678+
version "2.2.1"
2679+
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz#51552970fa04d723e04c56d04178c3f92592bbc0"
2680+
integrity sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ==
2681+
dependencies:
2682+
agent-base "^4.1.0"
2683+
debug "^3.1.0"
2684+
26352685
[email protected], iconv-lite@^0.4.17, iconv-lite@^0.4.4, iconv-lite@~0.4.13:
26362686
version "0.4.24"
26372687
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
@@ -3400,7 +3450,7 @@ jest@^24.8.0:
34003450
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
34013451
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
34023452

3403-
js-yaml@^3.13.0:
3453+
js-yaml@^3.13.0, js-yaml@^3.13.1:
34043454
version "3.13.1"
34053455
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847"
34063456
integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==
@@ -5715,6 +5765,15 @@ tar@^4:
57155765
safe-buffer "^5.1.2"
57165766
yallist "^3.0.2"
57175767

5768+
teeny-request@^3.11.3:
5769+
version "3.11.3"
5770+
resolved "https://registry.yarnpkg.com/teeny-request/-/teeny-request-3.11.3.tgz#335c629f7645e5d6599362df2f3230c4cbc23a55"
5771+
integrity sha512-CKncqSF7sH6p4rzCgkb/z/Pcos5efl0DmolzvlqRQUNcpRIruOhY9+T1FsIlyEbfWd7MsFpodROOwHYh2BaXzw==
5772+
dependencies:
5773+
https-proxy-agent "^2.2.1"
5774+
node-fetch "^2.2.0"
5775+
uuid "^3.3.2"
5776+
57185777
57195778
version "0.8.3"
57205779
resolved "https://registry.yarnpkg.com/temp/-/temp-0.8.3.tgz#e0c6bc4d26b903124410e4fed81103014dfc1f59"
@@ -5959,6 +6018,11 @@ urix@^0.1.0:
59596018
resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72"
59606019
integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=
59616020

6021+
urlgrey@^0.4.4:
6022+
version "0.4.4"
6023+
resolved "https://registry.yarnpkg.com/urlgrey/-/urlgrey-0.4.4.tgz#892fe95960805e85519f1cd4389f2cb4cbb7652f"
6024+
integrity sha1-iS/pWWCAXoVRnxzUOJ8stMu3ZS8=
6025+
59626026
use@^3.1.0:
59636027
version "3.1.1"
59646028
resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f"

0 commit comments

Comments
 (0)