When a library receives pull requests, code coverage of the contributions should continue to be tracked. Kent installs the codecov Node module which will automatically report coverage using the lcov report. Kent then updates the travis.yml configuration file to run the report on the after_success event. After the reports are run Kent demonstrates how to generate badges for the repository README file. Code for this exercise can be found on the FEM/09.1-report-coverage branch.
- Now that we have our builds running,…we want to be able to keep track of our code coverage…as people are contributing to the project,…and we also, when somebody makes a poll request,…we'll get integration with the Codecov bot…to tell us whether we've increased…or decreased our code coverage.…And so, we're going to add support for Codecov here.…So the first thing that we'll do here…is I'm actually going to install things…now through the command line.…
So npm install --save-dev, or capital D, codecov.…Pretty sure that's the one, yeah.…And that should install Codecov 1.0.1 right here.…With that installed,…we're going to add a script for releasing,…or for reporting our coverage.…
So I'll add that right below our test scripts.…Report coverage.…And the Codecov takes the lcov report that we're generating,…you can find that in the coverage lcov.info.…It takes that report through standard in,…which you can get with cat ./coverage/lcov.info,…and pipe that into codecov, the codecov binary.…
And then from that it will just…
Note: This course was created by Frontend Masters. It was originally released on 08/09/2016. We're pleased to host this training in our library.
- Creating an open-source library
- Linting and testing
- Code coverage
- Installing and configuring Babel
- Peer dependencies
- Forking and renaming
- Continuous integration and automating releases
Skill Level Intermediate
1. Creating an Open-Source Library
2. Linting and Testing
3. Git Hooks, Babel, and Webpack
4. Continuous Integration and Automating Releases
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.