chore(tests): add coverage reports and coveralls

This commit is contained in:
Stephan Bönnemann 2015-06-12 11:01:51 -07:00
parent 384bc63e5d
commit 191ae78a9f
6 changed files with 30 additions and 11 deletions

4
.gitignore vendored
View File

@ -1,8 +1,10 @@
# common
coverage
node_modules
*.log
.tmp
.nyc_output
.tests
.tmp
# build-artifacts
dist

View File

@ -1,8 +1,10 @@
# common
coverage
node_modules
*.log
.tmp
.nyc_output
.tests
.tmp
# source/config
src

View File

@ -1,15 +1,15 @@
language: node_js
node_js:
- iojs-v2
- iojs-v1
- '0.10'
- '0.12'
sudo: false
language: node_js
cache:
directories:
- node_modules
notifications:
email: false
node_js:
- iojs-v2
- iojs-v1
- '0.12'
- '0.10'
before_install:
- npm i -g npm@^2.0.0
before_script:
@ -18,6 +18,7 @@ before_script:
after_success:
- python travis_after_all.py
- export $(cat .to_export_back)
- if [[ $BUILD_LEADER = YES ]]; then npm run coveralls; fi
after_failure:
- python travis_after_all.py
- export $(cat .to_export_back)

View File

@ -1,5 +1,6 @@
# semantic-release
[![Build Status](https://travis-ci.org/boennemann/semantic-release.svg?branch=master)](https://travis-ci.org/boennemann/semantic-release)
[![Coverage Status](https://coveralls.io/repos/boennemann/semantic-release/badge.svg)](https://coveralls.io/r/boennemann/semantic-release)
[![Dependency Status](https://david-dm.org/boennemann/semantic-release.svg)](https://david-dm.org/boennemann/semantic-release)
[![devDependency Status](https://david-dm.org/boennemann/semantic-release/dev-status.svg)](https://david-dm.org/boennemann/semantic-release#info=devDependencies)

View File

@ -27,6 +27,7 @@ var plugins = JSON.parse(readFile('./package.json')).release || {}
var main
/* istanbul ignore next */
try {
main = require('../dist/main')
} catch (e) {

View File

@ -7,6 +7,14 @@
"bugs": {
"url": "https://github.com/boennemann/semantic-release/issues"
},
"config": {
"nyc": {
"exclude": [
".tests",
"node_modules"
]
}
},
"dependencies": {
"abbrev": "^1.0.5",
"async": "^1.0.0",
@ -23,12 +31,14 @@
"semver": "^4.3.3"
},
"devDependencies": {
"coveralls": "^2.11.2",
"cracks": "^2.0.1",
"github-release-fake-server": "^1.3.0",
"lodash.defaults": "^3.0.0",
"nano-uid": "^0.2.0",
"nixt": "^0.4.1",
"nock": "^2.2.0",
"nyc": "^2.3.0",
"sinopia": "^1.0.0",
"standard": "^4.0.1",
"tap": "^1.2.0"
@ -64,12 +74,14 @@
},
"scripts": {
"build": "rm -rf dist && mkdir -p dist && babel src --out-dir dist",
"build:tests": "rm -rf .tests && mkdir -p .tests && babel tests --out-dir .tests",
"coverage": "nyc report",
"coveralls": "npm run coverage -- --reporter=lcovonly && cat coverage/lcov.info | coveralls",
"postpublish": "./bin/semantic-release.js post",
"prepublish": "npm run build && ./bin/semantic-release.js pre",
"pretest": "npm run build",
"pretest:integration": "rm -rf .tests && mkdir -p .tests && babel tests --out-dir .tests",
"pretest:integration": "npm run build && npm run build:tests",
"test": "./bin/test",
"test:integration": "tap .tests/{scenarios,tap}/*.js",
"test:integration": "nyc tap --no-cov .tests/{scenarios,tap}/*.js",
"test:style": "standard"
}
}