From fa6f514a05c7fcff977745c6afeb02e07f59659b Mon Sep 17 00:00:00 2001 From: curbengh <43627182+curbengh@users.noreply.github.com> Date: Sun, 29 Dec 2019 04:12:19 +0000 Subject: [PATCH] ci: add code coverage report --- .travis.yml | 2 ++ README.md | 1 + package.json | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9f5d3ff..76f2280 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,3 +21,5 @@ after_script: snyk protect; snyk monitor; fi + - npm install codecov + - codecov diff --git a/README.md b/README.md index 36639e2..fe389a3 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![npm version](https://badge.fury.io/js/hexo-yam.svg)](https://www.npmjs.com/package/hexo-yam) [![Build Status](https://travis-ci.com/curbengh/hexo-yam.svg?branch=master)](https://travis-ci.com/curbengh/hexo-yam) +[![codecov](https://codecov.io/gh/curbengh/hexo-yam/branch/master/graph/badge.svg)](https://codecov.io/gh/curbengh/hexo-yam) [![NPM Dependencies](https://david-dm.org/curbengh/hexo-yam.svg)](https://david-dm.org/curbengh/hexo-yam) [![Known Vulnerabilities](https://snyk.io/test/npm/hexo-yam/badge.svg)](https://snyk.io/test/npm/hexo-yam) [![Greenkeeper badge](https://badges.greenkeeper.io/curbengh/hexo-yam.svg)](https://greenkeeper.io/) diff --git a/package.json b/package.json index 1b4ea6e..13b5091 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "jest": { "clearMocks": true, "collectCoverage": true, - "coverageDirectory": "coverage", + "coverageDirectory": "./coverage/", "testEnvironment": "node" }, "greenkeeper": {