setup travis config

This commit is contained in:
Niklas von Hertzen 2013-05-29 18:41:15 +03:00
parent b91fd9bc87
commit 0d4b6ba665
4 changed files with 57 additions and 37 deletions

11
.travis.yml Normal file
View File

@ -0,0 +1,11 @@
---
language: node_js
node_js:
- '0.10'
env:
global:
- secure: "eW41gIqOizwO4pTgWnAAbW75AP7F+CK9qfSed/fSh4sJ9HWMIY1YRIaY8gjr+6jV/f7XVHcXuym6ZxgINYSkVKbF1JKxBJNLOXtSgNbVHSic58pYFvUjwxIBI9aPig9uux1+DbnpWqXFDTcACJSevQZE0xwmjdrSkDLgB0G34v8="
- secure: "Y2Av+Gd3z9uQEB36GwdOOuGka0hx0/HeitASEo59z934O8RxnmN9eNTXS7dDT3XtKtwxIyLTOEpS7qlRdWahH28hr/dS4xJj6ao58C+1xMcDs6NAPGmDxUlcJWpcGEsnjmXjQCc3fBioSTdpIBrK/gdvgpNh77UKG74Sk7Z+YGk="
before_script:
- npm install -g grunt-cli
- curl https://gist.github.com/santiycr/5139565/raw/sauce_connect_setup.sh | bash

View File

@ -93,6 +93,7 @@ module.exports = function(grunt) {
// Default task.
grunt.registerTask('build', ['concat', 'uglify']);
grunt.registerTask('default', ['jshint', 'concat', 'qunit', 'uglify', 'webdriver']);
grunt.registerTask('default', ['jshint', 'concat', 'qunit', 'uglify']);
grunt.registerTask('travis', ['jshint', 'concat', 'qunit', 'uglify', 'webdriver']);
};

View File

@ -1,32 +1,35 @@
{
"title": "html2canvas",
"name": "html2canvas",
"description": "Screenshots with JavaScript",
"version": "0.4.0",
"author": {
"name": "Niklas von Hertzen (@niklasvh)"
},
"engines": {
"node": ">=0.8.0"
},
"dependencies": {
"base64-arraybuffer": ">= 0.1.0",
"png-js": ">= 0.1.1",
"sync-webdriver": ">=0.1.1",
"express": "~3.2.3",
"baconjs": "~0.3.15"
},
"devDependencies": {
"grunt": ">=0.4.0",
"grunt-contrib-concat": "*",
"grunt-contrib-uglify": "*",
"grunt-contrib-jshint": "*",
"grunt-contrib-qunit": "*"
},
"homepage": "http://html2canvas.hertzen.com",
"licenses": [
{
"type": "MIT"
}
]
"title": "html2canvas",
"name": "html2canvas",
"description": "Screenshots with JavaScript",
"version": "0.4.0",
"author": {
"name": "Niklas von Hertzen (@niklasvh)"
},
"engines": {
"node": ">=0.8.0"
},
"dependencies": {
"base64-arraybuffer": ">= 0.1.0",
"png-js": ">= 0.1.1",
"sync-webdriver": ">=0.1.1",
"express": "~3.2.3",
"baconjs": "~0.3.15"
},
"devDependencies": {
"grunt": ">=0.4.0",
"grunt-contrib-concat": "*",
"grunt-contrib-uglify": "*",
"grunt-contrib-jshint": "*",
"grunt-contrib-qunit": "*"
},
"scripts": {
"test": "grunt travis --verbose"
},
"homepage": "http://html2canvas.hertzen.com",
"licenses": [
{
"type": "MIT"
}
]
}

View File

@ -246,12 +246,18 @@
var tests = [],
outputImages = false,
results = {},
testStream = getTests("tests/cases");
results = {};
exports.tests = function() {
var testStream = getTests("tests/cases");
testStream.onValue(function(test) {
tests.push(test);
});
testStream.onEnd(runWebDriver);
};
testStream.onValue(function(test) {
tests.push(test);
});
/*
if (outputImages) {
@ -261,5 +267,4 @@
}
*/
testStream.onEnd(runWebDriver);
})();