Switch to nyc, babel-plugin-istanbul & codecov-node for code coverage #4885

Merged
merged 4 commits into from Nov 28, 2016

Projects

None yet

4 participants

@bcoe
Contributor
bcoe commented Nov 22, 2016 edited

This sees @motiz88's work over the finish line; I released a couple more changes to nyc for babel's benefit (caching on by default, configurable debug output) and tested thoroughly:

Q A
Bug fix? No
Breaking change? No
New feature? No
Deprecations? No
Spec compliancy? No
Tests added/pass? No (they pass though, woo!)
Fixed tickets See #4740
License MIT
Doc PR Nope
Dependency Changes

Just a couple tweaks to @motiz88's work, and a rebase with master; would love to see this over the finish line:

Note: we do now add empty reports for files that aren't accessed.

CC: @danez, @hzoo

motiz88 and others added some commits Oct 15, 2016
@motiz88 @bcoe motiz88 Switch to nyc, babel-plugin-istanbul & codecov-node for code coverage
This setup (very much like Babylon's) let us trace code coverage back to the `src/` directories of packages.
709d082
@motiz88 @bcoe motiz88 Exclude package tests from coverage report 1f4626d
@bcoe bcoe fix: upgrade to version of nyc that tweaks a couple more things for b…
…abel
3e299be
@motiz88
Contributor
motiz88 commented Nov 22, 2016

Oh lovely. @bcoe I really appreciate you picking this up.

@codecov-io
codecov-io commented Nov 22, 2016 edited

Current coverage is 89.22% (diff: 100%)

Merging #4885 into master will decrease coverage by 0.12%

@@             master      #4885   diff @@
==========================================
  Files           196        204      +8   
  Lines         14022      10487   -3535   
  Methods        1460       1153    -307   
  Messages          0          0           
  Branches       3263       2762    -501   
==========================================
- Hits          12529       9357   -3172   
+ Misses         1493       1130    -363   
  Partials          0          0           

Powered by Codecov. Last update 7e02027...02ba5ae

Makefile
./scripts/test-cov.sh
test-ci:
NODE_ENV=test make bootstrap
- ./scripts/test-cov.sh
- cat ./coverage/coverage.json | ./node_modules/codecov.io/bin/codecov.io.js
+ # if ./node_modules/.bin/semver `npm --version` -r ">=3.3.0"; then ./node_modules/.bin/flow check; fi
@hzoo
hzoo Nov 22, 2016 Member

this comment can be removed since we run flow in a separate travis thing now

@bcoe bcoe fix: remove comment based on @hzoo's review
02ba5ae
@bcoe
Contributor
bcoe commented Nov 22, 2016

@hzoo 👍

@hzoo
hzoo approved these changes Nov 22, 2016 View changes
@hzoo
Member
hzoo commented Nov 23, 2016

Dono if it's worth adding make/npm command for us to open the coverage locally (if it works online then great, since it always seemed to be weird for me)

@bcoe
Contributor
bcoe commented Nov 23, 2016

@hzoo you can run:

./node_modules/.bin/nyc --reporter=html

And view an html report in the /coverage folder; would you like to add a shortcut for that to package.json?

@bcoe
Contributor
bcoe commented Nov 27, 2016

@hzoo perhaps we can land this, and in a separate issue if you describe to me the types of reports you'd like output I'd be happy to add a few more npm-scripts for you post-hoc.

@hzoo
Member
hzoo commented Nov 28, 2016

Ah yeah that was just a comment not a review or anything (I wasn't doing much oss last week)

@hzoo hzoo merged commit db67d7f into babel:master Nov 28, 2016

4 checks passed

ci/circleci Your tests passed on CircleCI!
Details
codecov/patch Coverage not affected when comparing 7e02027...02ba5ae
Details
codecov/project Absolute coverage decreased by -0.12% but relative coverage increased by +10.64% compared to 7e02027
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@bcoe
Contributor
bcoe commented Nov 29, 2016

@hzoo hooray, thanks for landing this 👍 and @motiz88 thanks for all the hard work. having both projects using each other will help ensure logic is less likely to break going forward 💯

@hzoo hzoo referenced this pull request in sveltejs/svelte Nov 29, 2016
@Rich-Harris Rich-Harris argh i have no idea what im doing ad4726c
@panagosg7 panagosg7 added a commit to panagosg7/babel that referenced this pull request Jan 17, 2017
@bcoe @panagosg7 bcoe + panagosg7 Switch to nyc, babel-plugin-istanbul & codecov-node for code coverage (
…#4885)

* Switch to nyc, babel-plugin-istanbul & codecov-node for code coverage

This setup (very much like Babylon's) let us trace code coverage back to the `src/` directories of packages.

* Exclude package tests from coverage report

* fix: upgrade to version of nyc that tweaks a couple more things for babel

* fix: remove comment based on @hzoo's review
b2d4b12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment