s3-badges

1.0.1 • Public • Published

s3-badges

Custom coverage badge generation and aws-s3 publishing

Currently suported:

  1. Istanbul coverage report
  2. Upload to s3 bucket (static web mode)

Configure your project

Install the package

npm install s3-badges nyc istanbul

Configure your project with necesary info for badge generation. You have an .s3-badgesrc.example you should paste in project's root folder with some options to configure.

.s3-badgesrc with minimal options (JSON format)

{
  "projectName": "dms",
  "awsAccessKeyId": "Your access key",
  "awsSecretAccessKey": "Your secret key"
}

Configure your package.json file to enable coverage report generation Add this line. Assuming you already have good working test command.

...
"test:coverage": "nyc --reporter=json-summary test",
...

Usage

npm run test:coverage
 
npx update-badges
 
istanbul-coverage {69.17%,orange}
Successfully uploaded package.
https://s3-<ZONE>.amazonaws.com/<BUCKET>/<PROJECT_NAME>-coverage.svg created

Now you can paste reported badge's link in your README.md file.

Dependents (0)

Package Sidebar

Install

npm i s3-badges

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

7.63 kB

Total Files

13

Last publish

Collaborators

  • sergioshev