Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

codecov

Package Overview
Dependencies
28
Maintainers
5
Versions
33
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    codecov

Uploading report to Codecov: https://codecov.io


Version published
Weekly downloads
397K
decreased by-2.5%
Maintainers
5
Install size
1.58 MB
Created
Weekly downloads
 

Package description

What is codecov?

The codecov npm package is a tool for uploading code coverage reports to Codecov, a service that provides hosted coverage reports with detailed insights and visualizations. It integrates with various CI/CD pipelines to automate the process of collecting and uploading coverage data.

What are codecov's main functionalities?

Upload Coverage Reports

This feature allows you to upload your code coverage reports to Codecov. You need to provide your Codecov token and the path to the coverage report file.

const codecov = require('codecov');
codecov.upload({ token: 'your-codecov-token', file: 'path/to/coverage.xml' });

CI/CD Integration

This feature demonstrates how to integrate Codecov with your CI/CD pipeline. It uses environment variables to dynamically set the token, branch, and commit information.

const codecov = require('codecov');
codecov.upload({ token: process.env.CODECOV_TOKEN, file: 'coverage.xml', branch: process.env.CI_BRANCH, commit: process.env.CI_COMMIT });

Custom Flags

This feature allows you to add custom flags to your coverage reports. Flags can be used to differentiate between different types of tests or coverage reports.

const codecov = require('codecov');
codecov.upload({ token: 'your-codecov-token', file: 'coverage.xml', flags: 'unittests' });

Other packages similar to codecov

Changelog

Source

3.8.1

Fixes

  • #246 Revert "Bump teeny-request from 6.0.1 to 7.0.0"

Readme

Source

Codecov NodeJS Uploader

codecov.io NPM version Build Status Build Status Dependency Status Dev Dependency Status FOSSA Status

Codecov.io support for node.js.

Installation:

Add the latest version of codecov to your package.json:

npm install codecov --save-dev

or

yarn add codecov --dev

Usage:

This script ( bin/codecov ) detect your CI provider and all coverage reports and uploads them to Codecov.

Once your app is instrumented for coverage, and building, simply call ./node_modules/.bin/codecov.

This library currently supports the following CI companies: Travis CI, Travis, Appveyor, CircleCI, Cirrus CI, Codeship, Drone, Jenkins, Shippable, Semaphore, Wercker, Snap CI, Buildkite, AWS CodeBuild.

Upload repo tokens

Repo tokens are not required for public repos tested on Travis-Org, CircleCI or AppVeyor.

Repo tokens are necessary to distinguish your repository from others. You can find your repo token on your repository page at Codecov. Set this unique uuid to CODECOV_TOKEN in your environment variables.

export CODECOV_TOKEN=":uuid-repo-token"
# or
./node_modules/.bin/codecov --token=:token
# or
./node_modules/.bin/nyc report --reporter=text-lcov | ./node_modules/.bin/codecov --pipe
Istanbul

With Mocha:

istanbul cover ./node_modules/mocha/bin/_mocha -- -R spec
./node_modules/.bin/codecov

With Jasmine:

istanbul cover jasmine-node --captureExceptions spec/
./node_modules/.bin/codecov

With Tape:

istanbul cover test.js
./node_modules/.bin/codecov

With NYC

nyc npm test
nyc report --reporter=text-lcov > coverage.lcov
./node_modules/.bin/codecov

Troubleshooting

If you're seeing an HTTP 400 error when uploading reports to S3, make sure you've updated to at least version 3.7.0.

License

FOSSA Status

Keywords

FAQs

Last updated on 03 Nov 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc