Permalink
Browse files

chore: only test saucelabs on master, otherwise only phantomjs

  • Loading branch information...
1 parent 8d08487 commit c59772097fb16f9729187e11cddd47387c05727e @meandmax committed Aug 26, 2016
Showing with 49 additions and 42 deletions.
  1. +1 −0 .travis.yml
  2. +3 −1 package.json
  3. +0 −41 saucelabs.karma.conf.js
  4. +45 −0 travis.karma.conf.js
View
@@ -16,6 +16,7 @@ script: "npm run travis"
after_success:
- python travis_after_all.py
- export $(cat .to_export_back)
+ - test $TRAVIS_BRANCH = "master" && test $TRAVIS_PULL_REQUEST = false && test $SAUCE_ACCESS_KEY && test $SAUCE_USERNAME && npm run "karma-sauce"
- npm run semantic-release
branches:
except:
View
@@ -89,7 +89,9 @@
"start": "better-npm-run start",
"dev": "better-npm-run dev",
"build": "better-npm-run build",
- "travis": "npm run build && karma start saucelabs.karma.conf.js",
+ "travis": "npm run build && npm run karma-travis",
+ "karma-sauce": "karma start saucelabs.karma.conf.js",
+ "karma-travis": "karma start travis.karma.conf.js",
"karma-local": "karma start local.karma.conf.js",
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
},
@@ -1,18 +1,7 @@
'use strict';
module.exports = function(config) {
- if (!process.env.SAUCE_USERNAME || !process.env.SAUCE_ACCESS_KEY) {
- console.log('Make sure the SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables are set.');
- process.exit(1);
- }
-
var customLaunchers = {
- // sauceLabsInternetExplorer9: {
- // base: 'SauceLabs',
- // browserName: 'internet explorer',
- // platform: 'Windows 7',
- // version: '9.0'
- // },
sauceLabsInternetExplorer10: {
base: 'SauceLabs',
browserName: 'internet explorer',
@@ -65,36 +54,6 @@ module.exports = function(config) {
platform: 'Mac 10.10',
version: '8.0'
}
- // sauceLabsIPhone9: {
- // base: 'SauceLabs',
- // browserName: 'iPhone',
- // version: '9.0'
- // },
- // sauceLabsIPhone8: {
- // base: 'SauceLabs',
- // browserName: 'iPhone',
- // version: '8.0'
- // },
- // sauceLabsIPhone7: {
- // base: 'SauceLabs',
- // browserName: 'iPhone',
- // version: '7.0'
- // },
- // sauceLabsIPad9: {
- // base: 'SauceLabs',
- // browserName: 'iPad',
- // version: '9.0'
- // },
- // sauceLabsIPad8: {
- // base: 'SauceLabs',
- // browserName: 'iPad',
- // version: '8.0'
- // },
- // sauceLabsIPad7: {
- // base: 'SauceLabs',
- // browserName: 'iPad',
- // version: '7.0'
- // }
};
config.set({
View
@@ -0,0 +1,45 @@
+'use strict';
+
+module.exports = function (config) {
+ config.set({
+ frameworks: [
+ 'mocha',
+ 'chai',
+ 'fixture'
+ ],
+
+ reporters: [
+ 'mocha'
+ ],
+
+ files: [
+ 'dist/lory.js',
+ 'test/lory.test.js',
+ 'static/app.css',
+ 'http://cdnjs.cloudflare.com/ajax/libs/classlist/2014.01.31/classList.min.js',
+
+ {
+ pattern: 'test/*.html'
+ }
+ ],
+
+ browsers: [
+ 'PhantomJS'
+ ],
+
+ plugins: [
+ 'karma-mocha',
+ 'karma-mocha-reporter',
+ 'karma-chai',
+ 'karma-fixture',
+ 'karma-phantomjs-launcher',
+ 'karma-html2js-preprocessor'
+ ],
+
+ preprocessors: {
+ 'test/*.html': ['html2js']
+ },
+
+ singleRun: true
+ });
+};

0 comments on commit c597720

Please sign in to comment.