chore(tests): add coverage reports and coveralls
This commit is contained in:
parent
384bc63e5d
commit
191ae78a9f
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,8 +1,10 @@
|
||||
# common
|
||||
coverage
|
||||
node_modules
|
||||
*.log
|
||||
.tmp
|
||||
.nyc_output
|
||||
.tests
|
||||
.tmp
|
||||
|
||||
# build-artifacts
|
||||
dist
|
||||
|
@ -1,8 +1,10 @@
|
||||
# common
|
||||
coverage
|
||||
node_modules
|
||||
*.log
|
||||
.tmp
|
||||
.nyc_output
|
||||
.tests
|
||||
.tmp
|
||||
|
||||
# source/config
|
||||
src
|
||||
|
13
.travis.yml
13
.travis.yml
@ -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)
|
||||
|
@ -1,5 +1,6 @@
|
||||
# semantic-release
|
||||
[](https://travis-ci.org/boennemann/semantic-release)
|
||||
[](https://coveralls.io/r/boennemann/semantic-release)
|
||||
[](https://david-dm.org/boennemann/semantic-release)
|
||||
[](https://david-dm.org/boennemann/semantic-release#info=devDependencies)
|
||||
|
||||
|
@ -27,6 +27,7 @@ var plugins = JSON.parse(readFile('./package.json')).release || {}
|
||||
|
||||
var main
|
||||
|
||||
/* istanbul ignore next */
|
||||
try {
|
||||
main = require('../dist/main')
|
||||
} catch (e) {
|
||||
|
18
package.json
18
package.json
@ -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"
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user