0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-28 10:24:19 +01:00

switch to Sauce Labs for our cross-browser JS unit testing needs

Fixes #11087
This commit is contained in:
Chris Rebert 2013-12-03 18:42:31 -08:00
parent 1d20611d54
commit bd9332a58a
5 changed files with 104 additions and 49 deletions

View File

@ -6,6 +6,5 @@ before_script:
- npm install -g grunt-cli - npm install -g grunt-cli
env: env:
global: global:
- secure: Besg41eyU+2mfxrywQ4ydOShMdc34ImaO0S0ENP+aCOBuyNBIgP59wy5tBMmyai2/8eInYeVps4Td96mWInMMxzTe3Bar7eTLG5tWVKRSr/wc4NBPZ/ppoPAmCEsz9Y+VptRH9/FO8n7hsL9EFZ+xBKbG+C0SccGoyBDpA5j7/w= - SAUCE_USERNAME: bootstrap
- secure: Ptiv7phCImFP3ALIz+sMQzrZg8k7C1gLZbFBhWxjnQr3g06wIfX3Ls5y9OHvxid+lOZZjISui3wzBVgpVHqwHUYf96+r0mo6/mJ+F4ffUmShZANVaIMD/JRTnXhUQJbvntGLvxn1EYWPdNM+2IHJrMipnjHxU9tkgAnlel4Zdew= - secure: "pJkBwnuae9dKU5tEcCqccfS1QQw7/meEcfz63fM7ba7QJNjoA6BaXj08L5Z3Vb5vBmVPwBawxo5Hp0jC0r/Z/O0hGnAmz/Cz09L+cy7dSAZ9x4hvZePSja/UAusaB5ogMoO8l2b773MzgQeSmrLbExr9BWLeqEfjC2hFgdgHLaQ="
- TWBS_HAVE_OWN_BROWSERSTACK_KEY: ""

View File

@ -169,12 +169,105 @@ module.exports = function(grunt) {
replacement: grunt.option('newver'), replacement: grunt.option('newver'),
recursive: true recursive: true
} }
},
'saucelabs-qunit': {
all: {
options: {
build: process.env.TRAVIS_JOB_ID,
concurrency: 3,
urls: ['http://127.0.0.1:3000/js/tests/index.html'],
browsers: [
// See https://saucelabs.com/docs/platforms/webdriver
{
browserName: 'safari',
version: '6',
platform: 'OS X 10.8'
},
{
browserName: 'chrome',
version: '28',
platform: 'OS X 10.6'
},
/* FIXME: currently fails 1 tooltip test
{
browserName: 'firefox',
version: '25',
platform: 'OS X 10.6'
},*/
// Mac Opera not currently supported by Sauce Labs
/* FIXME: currently fails 1 tooltip test
{
browserName: 'internet explorer',
version: '11',
platform: 'Windows 8.1'
},*/
/*
{
browserName: 'internet explorer',
version: '10',
platform: 'Windows 8'
},
{
browserName: 'internet explorer',
version: '9',
platform: 'Windows 7'
},
{
browserName: 'internet explorer',
version: '8',
platform: 'Windows 7'
},
{// unofficial
browserName: 'internet explorer',
version: '7',
platform: 'Windows XP'
},
*/
{
browserName: 'chrome',
version: '31',
platform: 'Windows 8.1'
},
{
browserName: 'firefox',
version: '25',
platform: 'Windows 8.1'
},
// Win Opera 15+ not currently supported by Sauce Labs
{
browserName: 'iphone',
version: '6.1',
platform: 'OS X 10.8'
},
// iOS Chrome not currently supported by Sauce Labs
// Linux (unofficial)
{
browserName: 'chrome',
version: '30',
platform: 'Linux'
},
{
browserName: 'firefox',
version: '25',
platform: 'Linux'
}
// Android Chrome not currently supported by Sauce Labs
/* Android Browser (super-unofficial)
{
browserName: 'android',
version: '4.0',
platform: 'Linux'
}
*/
],
}
}
} }
}); });
// These plugins provide necessary tasks. // These plugins provide necessary tasks.
grunt.loadNpmTasks('browserstack-runner');
grunt.loadNpmTasks('grunt-contrib-clean'); grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-concat'); grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-connect'); grunt.loadNpmTasks('grunt-contrib-connect');
@ -186,6 +279,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-html-validation'); grunt.loadNpmTasks('grunt-html-validation');
grunt.loadNpmTasks('grunt-jekyll'); grunt.loadNpmTasks('grunt-jekyll');
grunt.loadNpmTasks('grunt-recess'); grunt.loadNpmTasks('grunt-recess');
grunt.loadNpmTasks('grunt-saucelabs');
grunt.loadNpmTasks('grunt-sed'); grunt.loadNpmTasks('grunt-sed');
// Docs HTML validation task // Docs HTML validation task
@ -193,12 +287,10 @@ module.exports = function(grunt) {
// Test task. // Test task.
var testSubtasks = ['dist-css', 'jshint', 'qunit', 'validate-html']; var testSubtasks = ['dist-css', 'jshint', 'qunit', 'validate-html'];
// Only run BrowserStack tests under Travis // Only run Sauce Labs tests if there's a Sauce access key
if (process.env.TRAVIS) { if (typeof process.env.SAUCE_ACCESS_KEY !== 'undefined') {
// Only run BrowserStack tests if this is a mainline commit in twbs/bootstrap, or you have your own BrowserStack key testSubtasks.push('connect');
if ((process.env.TRAVIS_REPO_SLUG === 'twbs/bootstrap' && process.env.TRAVIS_PULL_REQUEST === 'false') || process.env.TWBS_HAVE_OWN_BROWSERSTACK_KEY) { testSubtasks.push('saucelabs-qunit');
testSubtasks.push('browserstack_runner');
}
} }
grunt.registerTask('test', testSubtasks); grunt.registerTask('test', testSubtasks);

View File

@ -1,4 +1,5 @@
# [Bootstrap](http://getbootstrap.com) [![Build Status](https://secure.travis-ci.org/twbs/bootstrap.png)](http://travis-ci.org/twbs/bootstrap) [![devDependency Status](https://david-dm.org/twbs/bootstrap/dev-status.png)](https://david-dm.org/twbs/bootstrap#info=devDependencies) # [Bootstrap](http://getbootstrap.com) [![Build Status](https://secure.travis-ci.org/twbs/bootstrap.png)](http://travis-ci.org/twbs/bootstrap) [![devDependency Status](https://david-dm.org/twbs/bootstrap/dev-status.png)](https://david-dm.org/twbs/bootstrap#info=devDependencies)
[![Selenium Test Status](https://saucelabs.com/browser-matrix/bootstrap.svg)](https://saucelabs.com/u/bootstrap)
Bootstrap is a sleek, intuitive, and powerful front-end framework for faster and easier web development, created and maintained by [Mark Otto](http://twitter.com/mdo) and [Jacob Thornton](http://twitter.com/fat). Bootstrap is a sleek, intuitive, and powerful front-end framework for faster and easier web development, created and maintained by [Mark Otto](http://twitter.com/mdo) and [Jacob Thornton](http://twitter.com/fat).

View File

@ -1,37 +0,0 @@
{
"username": "--secure--",
"key": "--secure--",
"test_path": "js/tests/index.html",
"browsers": [
{
"browser": "firefox",
"browser_version": "latest",
"os": "OS X",
"os_version": "Mountain Lion"
},
{
"browser": "safari",
"browser_version": "latest",
"os": "OS X",
"os_version": "Mountain Lion"
},
{
"browser": "chrome",
"browser_version": "latest",
"os": "OS X",
"os_version": "Mountain Lion"
},
{
"browser": "firefox",
"browser_version": "latest",
"os": "Windows",
"os_version": "7"
},
{
"browser": "chrome",
"browser_version": "latest",
"os": "Windows",
"os_version": "7"
}
]
}

View File

@ -20,8 +20,7 @@
} }
] ]
, "devDependencies": { , "devDependencies": {
"browserstack-runner": "~0.0.12" "btoa": "~1.1.1"
, "btoa": "~1.1.1"
, "grunt": "~0.4.1" , "grunt": "~0.4.1"
, "grunt-contrib-clean": "~0.5.0" , "grunt-contrib-clean": "~0.5.0"
, "grunt-contrib-concat": "~0.3.0" , "grunt-contrib-concat": "~0.3.0"
@ -34,6 +33,7 @@
, "grunt-html-validation": "~0.1.6" , "grunt-html-validation": "~0.1.6"
, "grunt-jekyll": "~0.4.0" , "grunt-jekyll": "~0.4.0"
, "grunt-recess": "~0.5.0" , "grunt-recess": "~0.5.0"
, "grunt-saucelabs": "~4.1.2"
, "grunt-sed": "~0.1.1" , "grunt-sed": "~0.1.1"
, "regexp-quote": "~0.0.0" , "regexp-quote": "~0.0.0"
} }