Skip to content

Commit

Permalink
update travis-ci config, and remove fucking grunt.
Browse files Browse the repository at this point in the history
  • Loading branch information
huang-xiao-jian committed Mar 2, 2015
1 parent 3111cd2 commit 9df6903
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 62 deletions.
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
language: node_js
node_js:
- "0.12"
before_install: npm run-script prepare-test && npm run-script prepare-dependency
before_install:
- "npm run-script prepare-test"
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
script: "npm run-script test-travis"
after_success: "npm install coveralls@2.10.0 && cat ./coverage/lcov.info | coveralls"
72 changes: 72 additions & 0 deletions CI.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',


// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['jasmine'],


// list of files / patterns to load in the browser
files: [
'bower_components/jquery/dist/jquery.js',
'bower_components/angular/angular.js',
'bower_components/angular-mocks/angular-mocks.js',
'src/storage.js',
'test/*.spec.js'
],

preprocessors: {
// source files, that you wanna generate coverage for
// do not include tests or libraries
// (these files will be instrumented by Istanbul)
'src/storage.js': ['coverage']
},


// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
// plugin support: junit, should config junitReporter in use
// plugin support: coverage, should config coverageReporter and preprocessors in use
reporters: ['coverage'],


// optionally, configure the reporter
coverageReporter: {
type : 'lcov',
dir : 'coverage/',
subdir: './'
},


// web server port
port: 9876,


// enable / disable colors in the output (reporters and logs)
colors: true,


// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,


// enable / disable watching file and executing tests whenever any file changes
autoWatch: false,


// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
// available options 'Chrome', 'IE', 'Firefox', 'PhantomJS' while 'IE8','IE9' approaching
browsers: ['Firefox'],


// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: true
});
};
54 changes: 0 additions & 54 deletions Gruntfile.js

This file was deleted.

3 changes: 0 additions & 3 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Karma configuration
// Generated on Tue Jul 29 2014 10:24:37 GMT+0800 (中国标准时间)

module.exports = function(config) {
config.set({

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@
"repository": "https://github.com/bornkiller/angularLocalStorage.git",
"dependencies": {},
"devDependencies": {
"grunt-karma": "^0.10.1",
"jasmine-core": "^2.2.0",
"jshint-stylish": "^1.0.1",
"karma": "^0.12.31",
"karma-chrome-launcher": "^0.1.7",
"karma-cli": "0.0.4",
"karma-coverage": "~0.2.7",
"karma-firefox-launcher": "^0.1.4",
"karma-ie-launcher": "^0.1.5",
"karma-jasmine": "^0.3.5",
"karma-phantomjs-launcher": "^0.1.4"
},
"scripts": {
"test": "./node_modules/.bin/grunt karma",
"prepare-test": "npm install bower grunt grunt-cli",
"prepare-dependency": "./node_modules/.bin/bower -F install"
"test": "./node_modules/.bin/karma start karma.conf.js",
"test-travis": "./node_modules/.bin/karma start CI.conf.js",
"prepare-test": "npm install bower && ./node_modules/.bin/bower -F install"
},
"author": "bornkiller",
"license": "MIT"
Expand Down

0 comments on commit 9df6903

Please sign in to comment.