Skip to content

Commit

Permalink
Code coverage and integrate codecov.io (#522)
Browse files Browse the repository at this point in the history
* Add codecov and script for coverage

* Change test to test-ci in travis and appveyor config

* Add coverage badge
  • Loading branch information
ksashikumar authored and devongovett committed Jan 10, 2018
1 parent 6c3d34f commit 97cf294
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 135 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ node_js:
- '8'
cache: yarn
script:
- yarn test
- yarn test-ci
- yarn lint
sudo: false
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
[![Backers on Open Collective](https://opencollective.com/parcel/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/parcel/sponsors/badge.svg)](#sponsors)
[![Travis CI Build Status](https://travis-ci.org/parcel-bundler/parcel.svg?branch=master)](https://travis-ci.org/parcel-bundler/parcel)
[![Appveyor Build status](https://ci.appveyor.com/api/projects/status/nr7d6qjxj3wwsw6n?svg=true)](https://ci.appveyor.com/project/devongovett/parcel)
[![Coverage](https://img.shields.io/codecov/c/github/parcel-bundler/parcel/master.svg)](https://codecov.io/github/parcel-bundler/parcel/)
[![David Dependancy Status](https://david-dm.org/parcel-bundler/parcel.svg)](https://david-dm.org/parcel-bundler/parcel)
[![npm package](https://img.shields.io/npm/v/parcel-bundler.svg)](https://www.npmjs.com/package/parcel-bundler)
[![npm package](https://img.shields.io/npm/dm/parcel-bundler.svg)](https://www.npmjs.com/package/parcel-bundler)
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ test_script:
- node --version
- yarn --version
# run tests
- yarn test
- yarn test-ci
# run ESlint
- yarn lint

Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,14 @@
"prettier": "^1.9.1",
"rimraf": "^2.6.1",
"stylus": "^0.54.5",
"typescript": "^2.6.2"
"typescript": "^2.6.2",
"codecov": "^3.0.0"
},
"scripts": {
"test": "cross-env NODE_ENV=test mocha",
"test-coverage": "rm -rf coverage/* && nyc yarn test",
"report-coverage": "nyc report --reporter=lcov && codecov",
"test-ci": "yarn test-coverage && yarn report-coverage",
"format": "prettier --write './{src,bin,test}/**/*.{js,json,md}'",
"build": "yarn minify && babel src -d lib && ncp src/builtins lib/builtins",
"prepublish": "yarn build",
Expand Down
Loading

0 comments on commit 97cf294

Please sign in to comment.