Skip to content

Add coverage #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,3 @@ typings/


# End of https://www.gitignore.io/api/node

.npmrc
dist
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ dist: trusty
node_js:
- "stable"

install:
- npm install --ignore-scripts

script:
- nyc npm run install
- "source ~/.bash_profile || source ~/.bashrc || source ~/.zshrc"
- npm test

after_script:
- npm run report-coverage
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ mirror-config-china
[![NPM version](https://img.shields.io/npm/v/mirror-config-china.svg?style=flat-square)](https://www.npmjs.com/package/mirror-config-china)
[![Travis](https://img.shields.io/travis/gucong3000/mirror-config-china.svg?&label=Linux)](https://travis-ci.org/gucong3000/mirror-config-china)
[![AppVeyor](https://img.shields.io/appveyor/ci/gucong3000/mirror-config-china.svg?&label=Windows)](https://ci.appveyor.com/project/gucong3000/mirror-config-china)
[![codecov](https://img.shields.io/codecov/c/github/gucong3000/mirror-config-china.svg)](https://codecov.io/gh/gucong3000/mirror-config-china)

为中国内地的Node.js开发者准备的镜像配置,大大提高node模块安装速度。

Expand Down
7 changes: 6 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@ install:
# install Node.js
- ps: Install-Product node $env:nodejs_version
# install modules
- npm install
- npm install --ignore-scripts

# to run your custom scripts instead of automatic tests
test_script:
- node_modules/.bin/nyc npm run install
- npm test

# to run your custom scripts instead of provider deployments
after_test:
- npm run report-coverage
12 changes: 11 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@
},
"description": "Mirrors in China about node.js",
"devDependencies": {
"codecov": "^3.0.0",
"eslint": "^4.13.1",
"eslint-config-standard": "^11.0.0-beta.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-node": "^5.2.1",
"eslint-plugin-promise": "^3.6.0",
"eslint-plugin-standard": "^3.0.1",
"mocha": "^4.0.1"
"mocha": "^4.0.1",
"nyc": "^11.4.1"
},
"homepage": "https://github.com/gucong3000/mirror-config-china#readme",
"keywords": [
Expand All @@ -29,6 +31,13 @@
"license": "MIT",
"main": "./index.js",
"name": "mirror-config-china",
"nyc": {
"reporter": [
"lcov",
"text-summary"
],
"cache": true
},
"repository": {
"type": "git",
"url": "git+https://github.com/gucong3000/mirror-config-china.git"
Expand All @@ -37,6 +46,7 @@
"preinstall": "node -e \"require('util').promisify.call\" || npm i util.promisify",
"install": "node lib/install",
"pretest": "eslint lib test *.js",
"report-coverage": "codecov",
"test": "mocha"
},
"version": "2.2.0"
Expand Down