Skip to content

Commit 1db68fa

Browse files
tatethurstonTate
and
Tate
authored
add coverage reporting (#74)
Co-authored-by: Tate <[email protected]>
1 parent da1e417 commit 1db68fa

File tree

7 files changed

+113
-3
lines changed

7 files changed

+113
-3
lines changed

.github/workflows/ci.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,6 @@ jobs:
1616
cache: "yarn"
1717
- run: yarn
1818
- run: yarn lint
19-
- run: yarn test
19+
- run: yarn test:ci && yarn codecov --token=$CODECOV_TOKEN
20+
env:
21+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ dist
22
package-lock.json
33
todo.txt
44
node_modules
5+
coverage

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
dist
22
cdk.out
3+
coverage

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
<a href="https://github.com/tatethurston/twirpscript/actions/workflows/ci.yml">
1717
<img src="https://github.com/tatethurston/twirpscript/actions/workflows/ci.yml/badge.svg">
1818
</a>
19+
<a href="https://codecov.io/gh/tatethurston/twirpscript">
20+
<img src="https://img.shields.io/codecov/c/github/tatethurston/twirpscript/main.svg?style=flat-square">
21+
</a>
1922

2023
## What is this? 🧐
2124

codecov.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
coverage:
2+
status:
3+
project:
4+
default:
5+
target: auto
6+
threshold: 10%

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"lint:package:fix": "prettier-package-json --write ./package.json",
3131
"prepack": "yarn build",
3232
"test": "yarn jest src/*",
33+
"test:ci": "yarn test --coverage",
3334
"test:compat": "(cd e2e-tests/clientcompat && yarn twirpscript && yarn test)",
3435
"test:e2e": "(cd e2e-tests/test-protos && yarn test)",
3536
"test:e2e:setup": "yarn build && npm link && for test in e2e-tests/*; do (cd \"$test\" && npm link twirpscript && yarn); done",
@@ -54,6 +55,7 @@
5455
"@typescript-eslint/eslint-plugin": "^4.1.0",
5556
"@typescript-eslint/parser": "^4.1.0",
5657
"babel-loader": "^8.2.2",
58+
"codecov": "^3.8.3",
5759
"eslint": "^7.8.1",
5860
"eslint-config-prettier": "^8.1.0",
5961
"husky": "^4.2.5",

yarn.lock

+97-2
Original file line numberDiff line numberDiff line change
@@ -1665,6 +1665,11 @@ argparse@^1.0.7:
16651665
dependencies:
16661666
sprintf-js "~1.0.2"
16671667

1668+
1669+
version "0.0.2"
1670+
resolved "https://registry.yarnpkg.com/argv/-/argv-0.0.2.tgz#ecbd16f8949b157183711b1bda334f37840185ab"
1671+
integrity sha1-7L0W+JSbFXGDcRsb2jNPN4QBhas=
1672+
16681673
array-union@^2.1.0:
16691674
version "2.1.0"
16701675
resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d"
@@ -1933,6 +1938,17 @@ co@^4.6.0:
19331938
resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
19341939
integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=
19351940

1941+
codecov@^3.8.3:
1942+
version "3.8.3"
1943+
resolved "https://registry.yarnpkg.com/codecov/-/codecov-3.8.3.tgz#9c3e364b8a700c597346ae98418d09880a3fdbe7"
1944+
integrity sha512-Y8Hw+V3HgR7V71xWH2vQ9lyS358CbGCldWlJFR0JirqoGtOoas3R3/OclRTvgUYFK29mmJICDPauVKmpqbwhOA==
1945+
dependencies:
1946+
argv "0.0.2"
1947+
ignore-walk "3.0.4"
1948+
js-yaml "3.14.1"
1949+
teeny-request "7.1.1"
1950+
urlgrey "1.0.0"
1951+
19361952
collect-v8-coverage@^1.0.0:
19371953
version "1.0.1"
19381954
resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz#cc2c8e94fc18bbdffe64d6534570c8a673b27f59"
@@ -2413,6 +2429,13 @@ fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6:
24132429
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
24142430
integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=
24152431

2432+
fast-url-parser@^1.1.3:
2433+
version "1.1.3"
2434+
resolved "https://registry.yarnpkg.com/fast-url-parser/-/fast-url-parser-1.1.3.tgz#f4af3ea9f34d8a271cf58ad2b3759f431f0b318d"
2435+
integrity sha1-9K8+qfNNiicc9YrSs3WfQx8LMY0=
2436+
dependencies:
2437+
punycode "^1.3.2"
2438+
24162439
fastest-levenshtein@^1.0.12:
24172440
version "1.0.12"
24182441
resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz#9990f7d3a88cc5a9ffd1f1745745251700d497e2"
@@ -2650,7 +2673,7 @@ html-escaper@^2.0.0:
26502673
resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453"
26512674
integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==
26522675

2653-
http-proxy-agent@^4.0.1:
2676+
http-proxy-agent@^4.0.0, http-proxy-agent@^4.0.1:
26542677
version "4.0.1"
26552678
resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a"
26562679
integrity sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==
@@ -2695,6 +2718,13 @@ [email protected]:
26952718
dependencies:
26962719
safer-buffer ">= 2.1.2 < 3"
26972720

2721+
2722+
version "3.0.4"
2723+
resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.4.tgz#c9a09f69b7c7b479a5d74ac1a3c0d4236d2a6335"
2724+
integrity sha512-PY6Ii8o1jMRA1z4F2hRkH/xN59ox43DavKvD3oDpfurRlOJyAHpifIwpbdv1n4jt4ov0jSpw3kQ4GhJnpBL6WQ==
2725+
dependencies:
2726+
minimatch "^3.0.4"
2727+
26982728
ignore@^4.0.6:
26992729
version "4.0.6"
27002730
resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc"
@@ -3279,7 +3309,7 @@ js-tokens@^4.0.0:
32793309
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
32803310
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
32813311

3282-
js-yaml@^3.13.1:
3312+
js-yaml@3.14.1, js-yaml@^3.13.1:
32833313
version "3.14.1"
32843314
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537"
32853315
integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==
@@ -3550,6 +3580,13 @@ neo-async@^2.6.2:
35503580
resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f"
35513581
integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==
35523582

3583+
node-fetch@^2.6.1:
3584+
version "2.6.6"
3585+
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.6.tgz#1751a7c01834e8e1697758732e9efb6eeadfaf89"
3586+
integrity sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==
3587+
dependencies:
3588+
whatwg-url "^5.0.0"
3589+
35533590
node-int64@^0.4.0:
35543591
version "0.4.0"
35553592
resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b"
@@ -3822,6 +3859,11 @@ psl@^1.1.33:
38223859
resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24"
38233860
integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==
38243861

3862+
punycode@^1.3.2:
3863+
version "1.4.1"
3864+
resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
3865+
integrity sha1-wNWmOycYgArY4esPpSachN1BhF4=
3866+
38253867
punycode@^2.1.0, punycode@^2.1.1:
38263868
version "2.1.1"
38273869
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
@@ -4120,6 +4162,13 @@ stack-utils@^2.0.3:
41204162
dependencies:
41214163
escape-string-regexp "^2.0.0"
41224164

4165+
stream-events@^1.0.5:
4166+
version "1.0.5"
4167+
resolved "https://registry.yarnpkg.com/stream-events/-/stream-events-1.0.5.tgz#bbc898ec4df33a4902d892333d47da9bf1c406d5"
4168+
integrity sha512-E1GUzBSgvct8Jsb3v2X15pjzN1tYebtbLaMg+eBOUOAxgbLoSbT2NS91ckc5lJD1KfLjId+jXJRgo0qnV5Nerg==
4169+
dependencies:
4170+
stubs "^3.0.0"
4171+
41234172
string-length@^4.0.1:
41244173
version "4.0.2"
41254174
resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a"
@@ -4159,6 +4208,11 @@ strip-json-comments@^3.1.0, strip-json-comments@^3.1.1:
41594208
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006"
41604209
integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==
41614210

4211+
stubs@^3.0.0:
4212+
version "3.0.0"
4213+
resolved "https://registry.yarnpkg.com/stubs/-/stubs-3.0.0.tgz#e8d2ba1fa9c90570303c030b6900f7d5f89abe5b"
4214+
integrity sha1-6NK6H6nJBXAwPAMLaQD31fiavls=
4215+
41624216
supports-color@^5.3.0:
41634217
version "5.5.0"
41644218
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
@@ -4210,6 +4264,17 @@ tapable@^2.1.1, tapable@^2.2.0:
42104264
resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0"
42114265
integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==
42124266

4267+
4268+
version "7.1.1"
4269+
resolved "https://registry.yarnpkg.com/teeny-request/-/teeny-request-7.1.1.tgz#2b0d156f4a8ad81de44303302ba8d7f1f05e20e6"
4270+
integrity sha512-iwY6rkW5DDGq8hE2YgNQlKbptYpY5Nn2xecjQiNjOXWbKzPGUfmeUBCSQbbr306d7Z7U2N0TPl+/SwYRfua1Dg==
4271+
dependencies:
4272+
http-proxy-agent "^4.0.0"
4273+
https-proxy-agent "^5.0.0"
4274+
node-fetch "^2.6.1"
4275+
stream-events "^1.0.5"
4276+
uuid "^8.0.0"
4277+
42134278
terminal-link@^2.0.0:
42144279
version "2.1.1"
42154280
resolved "https://registry.yarnpkg.com/terminal-link/-/terminal-link-2.1.1.tgz#14a64a27ab3c0df933ea546fba55f2d078edc994"
@@ -4291,6 +4356,11 @@ tr46@^2.1.0:
42914356
dependencies:
42924357
punycode "^2.1.1"
42934358

4359+
tr46@~0.0.3:
4360+
version "0.0.3"
4361+
resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a"
4362+
integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=
4363+
42944364
tslib@^1.8.1:
42954365
version "1.14.1"
42964366
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
@@ -4384,6 +4454,18 @@ uri-js@^4.2.2:
43844454
dependencies:
43854455
punycode "^2.1.0"
43864456

4457+
4458+
version "1.0.0"
4459+
resolved "https://registry.yarnpkg.com/urlgrey/-/urlgrey-1.0.0.tgz#72d2f904482d0b602e3c7fa599343d699bbe1017"
4460+
integrity sha512-hJfIzMPJmI9IlLkby8QrsCykQ+SXDeO2W5Q9QTW3QpqZVTx4a/K7p8/5q+/isD8vsbVaFgql/gvAoQCRQ2Cb5w==
4461+
dependencies:
4462+
fast-url-parser "^1.1.3"
4463+
4464+
uuid@^8.0.0:
4465+
version "8.3.2"
4466+
resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2"
4467+
integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==
4468+
43874469
v8-compile-cache@^2.0.3, v8-compile-cache@^2.2.0:
43884470
version "2.3.0"
43894471
resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee"
@@ -4427,6 +4509,11 @@ watchpack@^2.2.0:
44274509
glob-to-regexp "^0.4.1"
44284510
graceful-fs "^4.1.2"
44294511

4512+
webidl-conversions@^3.0.0:
4513+
version "3.0.1"
4514+
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871"
4515+
integrity sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=
4516+
44304517
webidl-conversions@^5.0.0:
44314518
version "5.0.0"
44324519
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-5.0.0.tgz#ae59c8a00b121543a2acc65c0434f57b0fc11aff"
@@ -4511,6 +4598,14 @@ whatwg-mimetype@^2.3.0:
45114598
resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf"
45124599
integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==
45134600

4601+
whatwg-url@^5.0.0:
4602+
version "5.0.0"
4603+
resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d"
4604+
integrity sha1-lmRU6HZUYuN2RNNib2dCzotwll0=
4605+
dependencies:
4606+
tr46 "~0.0.3"
4607+
webidl-conversions "^3.0.0"
4608+
45144609
whatwg-url@^8.0.0, whatwg-url@^8.5.0:
45154610
version "8.7.0"
45164611
resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.7.0.tgz#656a78e510ff8f3937bc0bcbe9f5c0ac35941b77"

0 commit comments

Comments
 (0)