Merge pull request #393 from openpgpjs/codeclimate

Codeclimate
This commit is contained in:
Giovanni Pellerano 2016-02-01 11:18:49 +01:00
commit cc66703763
5 changed files with 7 additions and 23 deletions

View File

@ -1,5 +1,8 @@
sudo: false
language: node_js
addons:
code_climate:
repo_token: $CODECLIMATE_REPO_TOKEN
matrix:
fast_finish: true
include:
@ -52,6 +55,6 @@ matrix:
- env: OPENPGPJSTEST='end2end-12' BROWSER='iphone 7.0'
- env: OPENPGPJSTEST='end2end-13' BROWSER='iphone 9.1'
before_script:
- npm install -g grunt-cli
- npm install -g grunt-cli codeclimate-test-reporter
script:
- $TRAVIS_BUILD_DIR/travis.sh

View File

@ -136,15 +136,6 @@ module.exports = function(grunt) {
root: '.',
timeout: 240000,
}
},
coveralls: {
src: ['test'],
options: {
root: '.',
timeout: 240000,
coverage: true,
reportFormats: ['cobertura','lcovonly']
}
}
},
mochaTest: {
@ -254,18 +245,8 @@ module.exports = function(grunt) {
grunt.registerTask('documentation', ['jsdoc']);
grunt.event.on('coverage', function(lcov, done){
require('coveralls').handleInput(lcov, function(err){
if (err) {
return done(err);
}
done();
});
});
// Test/Dev tasks
grunt.registerTask('test', ['jshint:build', 'jscs:build', 'copy:zlib', 'mochaTest']);
grunt.registerTask('coverage', ['copy:zlib', 'mocha_istanbul:coverage']);
grunt.registerTask('coveralls', ['copy:zlib', 'mocha_istanbul:coveralls']);
grunt.registerTask('saucelabs', ['default', 'copy:browsertest', 'connect', 'saucelabs-mocha']);
};

View File

@ -1,4 +1,4 @@
OpenPGP.js [![Build Status](https://travis-ci.org/openpgpjs/openpgpjs.svg?branch=master)](https://travis-ci.org/openpgpjs/openpgpjs) [![Coverage Status](https://coveralls.io/repos/openpgpjs/openpgpjs/badge.svg)](https://coveralls.io/r/openpgpjs/openpgpjs)
OpenPGP.js [![Build Status](https://travis-ci.org/openpgpjs/openpgpjs.svg?branch=master)](https://travis-ci.org/openpgpjs/openpgpjs) [![Test Coverage](https://codeclimate.com/github/openpgpjs/openpgpjs/badges/coverage.svg)](https://codeclimate.com/github/openpgpjs/openpgpjs/coverage) [![Code Climate](https://codeclimate.com/github/openpgpjs/openpgpjs/badges/gpa.svg)](https://codeclimate.com/github/openpgpjs/openpgpjs)
==========
[OpenPGP.js](http://openpgpjs.org/) is a Javascript implementation of the OpenPGP protocol. This is defined in [RFC 4880](http://tools.ietf.org/html/rfc4880).

View File

@ -33,7 +33,6 @@
},
"devDependencies": {
"chai": "~3.4.1",
"coveralls": "^2.11.2",
"grunt": "~0.4.5",
"grunt-browserify": "~4.0.1",
"grunt-contrib-clean": "~0.7.0",

View File

@ -4,7 +4,8 @@ set -e
if [ $OPENPGPJSTEST = "unit" ]; then
echo "Running OpenPGP.js unit-tests"
grunt coveralls
grunt coverage
codeclimate-test-reporter < coverage/lcov.info
elif [[ $OPENPGPJSTEST =~ ^end2end-.* ]]; then
echo "Running browser-testing on Saucelabs"