diff --git a/.travis.yml b/.travis.yml index be2357ef..caa8103b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,21 @@ language: node_js +cache: + directories: + - node_modules +notifications: + email: false node_js: - "6" - "5" - "4" before_install: - npm install -g coveralls codeclimate-test-reporter +before_script: + - npm prune script: - xo ./lib/**/*.js - istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- --require test/bootstrap test/*.test.js test/**/*.test.js - cat ./coverage/lcov.info | coveralls || echo 'Failed to upload to coveralls...' - codeclimate-test-reporter < ./coverage/lcov.info || echo 'Failed to upload to codeclimate...' +after_success: + - npm run semantic-release diff --git a/README.md b/README.md index a80a97b6..c71641dc 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![Build Status](https://travis-ci.org/patrickhulce/klay.svg?branch=master)](https://travis-ci.org/patrickhulce/klay) [![Coverage Status](https://coveralls.io/repos/github/patrickhulce/klay/badge.svg?branch=master)](https://coveralls.io/github/patrickhulce/klay?branch=master) [![Code Climate](https://codeclimate.com/github/patrickhulce/klay/badges/gpa.svg)](https://codeclimate.com/github/patrickhulce/klay) +[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) [![Dependencies](https://david-dm.org/patrickhulce/klay .svg)](https://david-dm.org/patrickhulce/klay) diff --git a/package.json b/package.json index c9d74e59..26d80a45 100644 --- a/package.json +++ b/package.json @@ -10,11 +10,12 @@ "scripts": { "test": "xo ./lib/**/*.js && mocha --reporter spec --require test/bootstrap test/*.test.js test/**/*.test.js", "test-coverage": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- --require test/bootstrap test/*.test.js test/**/*.test.js", - "test-watch": "mocha --watch --reporter dot --require test/bootstrap test/*.test.js test/**/*.test.js" + "test-watch": "mocha --watch --reporter dot --require test/bootstrap test/*.test.js test/**/*.test.js", + "semantic-release": "semantic-release pre && npm publish && semantic-release post" }, "repository": { "type": "git", - "url": "git+https://github.com/patrickhulce/klay.git" + "url": "https://github.com/patrickhulce/klay.git" }, "keywords": [ "validation" @@ -30,8 +31,10 @@ }, "devDependencies": { "chai": "^3.5.0", + "cz-conventional-changelog": "^1.1.6", "istanbul": "^0.4.4", "mocha": "^2.5.3", + "semantic-release": "^4.3.5", "sinon": "^1.17.4", "sinon-chai": "^2.8.0", "xo": "^0.16.0" @@ -72,5 +75,10 @@ "object" ] } + }, + "config": { + "commitizen": { + "path": "./node_modules/cz-conventional-changelog" + } } }