Skip to content

Commit

Permalink
Added continuous integration with travis-cli and SauceLabs
Browse files Browse the repository at this point in the history
  • Loading branch information
surtich committed Dec 27, 2013
1 parent 7baf4da commit 98bb7fb
Show file tree
Hide file tree
Showing 7 changed files with 159 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ iris-example/.settings/org.eclipse.jdt.core.prefs

*.prefs


node_modules/*
examples/todo-list/packed/*
/nbproject/private/
/nbproject/private/
sauce_connect.log*
15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
language: node_js
install:
- npm install grunt-cli -g
- npm install vargs
- npm install
env:
global:
- secure: kpfQjirYiO26KzynOZ4Q/z9F7LTY4VKWMwVwYj8FZvXm/bjF/E+kvGCigtvo/8OqEGAO7QNeSf45LfHu1aZwBVpMdKK5kInFAKCK5durQp3cwsaws1thi0NYRbEt5npfXgvps3Mttdk85UmTVfAyHc5Den+THXQVulaFpzDb17M=
- secure: i3dBm8jpxqSZ95HjaPXXGGOX97oZbnGMCvEndXrMOn2iUUp773EIDsuTt8vupAF5QivcO2ZLMZccvaktU3ioIEunvFgcynsaPwmd4QCzBvCXQBJj7rQcJqGRDMnJJMSR2PkaccYoYujsaQYunrK1KmB17mIniQJpivqS+wQud10=
cache:
directories:
- node_modules
after_script:
- grunt test-saucelabs

124 changes: 119 additions & 5 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,106 @@
/*global module:false*/
module.exports = function(grunt) {

var browsers = [
{
browserName: "chrome",
platform: "Linux"
},
{
browserName: "firefox",
platform: "Linux"
},
{
browserName: "opera",
platform: "Linux"
},
{
browserName: "android",
platform: "Linux"
},
{
browserName: "chrome",
platform: "Windows 8"
},
{
browserName: "firefox",
platform: "Windows 8"
},
{
browserName: "internet explorer",
platform: "Windows 8"
},
{
browserName: "chrome",
platform: "Windows 7"
},
{
browserName: "firefox",
platform: "Windows 7"
},
{
browserName: "internet explorer",
platform: "Windows 7",
version: "9"
},
{
browserName: "internet explorer",
platform: "Windows 7",
version: "8"
},
{
browserName: "opera",
platform: "Windows 7"
},
{
browserName: "safari",
platform: "Windows 7"
},
{
browserName: "chrome",
platform: "Windows XP"
},
{
browserName: "firefox",
platform: "Windows XP"
},
{
browserName: "internet explorer",
platform: "Windows XP",
version: "7"
},
{
browserName: "internet explorer",
platform: "Windows XP",
version: "6"
},
{
browserName: "chrome",
platform: "OS X 10.6"
},
{
browserName: "firefox",
platform: "OS X 10.6"
},
{
browserName: "safari",
platform: "OS X 10.6"
},
{
browserName: "iphone",
platform: "OS X 10.6"
},
{
browserName: "iphone",
platform: "OS X 10.8"
},
{
browserName: "iphone",
platform: "OS X 10.9"
}

];

var banner = '/*! <%= pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %>' +
' (<%= pkg.homepage %>) licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */\n';

Expand Down Expand Up @@ -63,6 +163,19 @@ module.exports = function(grunt) {
$: true
}
}
},
'saucelabs-qunit': {
all: {
options: {
urls: ["http://localhost:8080/test/iris.html"],
tunnelTimeout: 5,
build: process.env.TRAVIS_JOB_ID,
concurrency: 3,
browsers: browsers,
testname: "qunit tests from saucelabs",
tags: ["master"]
}
}
}
});

Expand Down Expand Up @@ -92,10 +205,11 @@ module.exports = function(grunt) {

grunt.registerTask('test', ['jshint', 'server', 'watch']);

grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.registerTask('test-saucelabs', ['jshint', 'server', 'concat', 'uglify', 'bower', 'saucelabs-qunit']);

// Loading dependencies
for (var key in grunt.file.readJSON("package.json").devDependencies) {
if (key !== "grunt" && key.indexOf("grunt") === 0) grunt.loadNpmTasks(key);
}

};
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[![Build Status](https://travis-ci.org/IGZJavierPerez/iris.png?branch=master)](https://travis-ci.org/IGZJavierPerez/iris)

[![Selenium Test Status](https://saucelabs.com/browser-matrix/surtich.svg?auth=861baeb3ee8833c887f16f59cbc41d1e)](https://saucelabs.com/u/surtich)

![Iris](https://raw.github.com/thegameofcode/iris/gh-pages/images/iris-logo-white.png)

Iris is not only another framework.
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"grunt-contrib-watch": "~0.3.1",
"grunt-contrib-jshint": "~0.4.3",
"grunt-contrib-concat": "~0.2.0",
"grunt-contrib-qunit": "~0.2.1"
"grunt-contrib-qunit": "~0.2.1",
"grunt-saucelabs": "git://github.com/axemclion/grunt-saucelabs.git"
}
}
14 changes: 14 additions & 0 deletions test/iris.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,19 @@ <h2 id="qunit-userAgent"></h2>
<span>awesome test markup</span>
</div>
<span id="start_iris"></span>
<script>
$(document)
.ready(function(){
$('#qunit-tests').addClass('hidepass');
})
.delegate("#qunit-testrunner-toolbar", "DOMNodeInserted", function(e){
$("#qunit-filter-pass").attr("checked", true)
})
.delegate("#qunit-filter-pass", "click", function(e){
e.stopPropagation();
var newValue = $(this).is(":checked");
$('#qunit-tests').toggleClass('hidepass', newValue);
});
</script>
</body>
</html>
3 changes: 2 additions & 1 deletion test/util_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
}
}


/*
test("Date format", function() {
stop();
Expand All @@ -99,6 +99,7 @@
start();
});
*/

test("Currency format", function() {
stop();
Expand Down

0 comments on commit 98bb7fb

Please sign in to comment.