Skip to content

Connect saucelabs testing environment with travis #1023

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ addons:
packages:
- gcc-4.8
- g++-4.8
sauce_connect:
# Update SAUCE_USERNAME / SAUCE_ACCESS_KEY in travis if necessary
# https://docs.travis-ci.com/user/environment-variables/#Defining-Variables-in-Repository-Settings
sauce_connect: true

cache:
directories:
Expand All @@ -25,7 +29,10 @@ install:
- npm install && npm run lint

script:
- npm test && node ./node_modules/markdown-doctest/bin/cmd.js && npm run cover && npm run check_circular_dependencies
- npm test && node ./node_modules/markdown-doctest/bin/cmd.js
- npm run check_circular_dependencies
- npm run cover
- cat ./coverage/coverage-remapped.lcov | ./node_modules/coveralls/bin/coveralls.js

after_script:
- cat ./coverage/coverage-remapped.lcov | ./node_modules/coveralls/bin/coveralls.js
after_success:
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ -n "${SAUCE_ACCESS_KEY}" ] && npm run test_karma || false'
28 changes: 24 additions & 4 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@
// Generated on Tue Dec 08 2015 23:01:01 GMT-0800 (Pacific Standard Time)

module.exports = function (config) {
// Check out https://saucelabs.com/platforms for expanding browser coverage
var customLaunchers = {
sl_chrome: {
base: 'SauceLabs',
browserName: 'chrome',
platform: 'Windows 10',
version: '46'
},
sl_firefox: {
base: 'SauceLabs',
browserName: 'firefox',
version: '30'
}
};

config.set({

// base path that will be used to resolve all patterns (eg. files, exclude)
Expand Down Expand Up @@ -31,7 +46,7 @@ module.exports = function (config) {
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['progress'],
reporters: ['dots','saucelabs'],

// web server port
port: 9876,
Expand All @@ -48,14 +63,19 @@ module.exports = function (config) {

// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['Chrome'],
customLaunchers: customLaunchers,
browsers: process.env.TRAVIS ? Object.keys(customLaunchers) : ['Chrome'],

// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: true,

// Concurrency level
// how many browser should be started simultanous
concurrency: 1
concurrency: 1,

sauceLabs: {
testName: 'RxJS 5 browser test'
}
});
};
};
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"cover": "istanbul cover -x \"*-spec.js index.js *-helper.js spec/helpers/*\" ./node_modules/jasmine/bin/jasmine.js && npm run cover_remapping",
"cover_remapping": "remap-istanbul -i coverage/coverage.json -o coverage/coverage-remapped.json && remap-istanbul -i coverage/coverage.json -o coverage/coverage-remapped.lcov -t lcovonly && remap-istanbul -i coverage/coverage.json -o coverage/coverage-remapped -t html",
"test": "jasmine",
"test_karma": "karma start karma.conf.js",
"tests2png": "mkdirp img && JASMINE_CONFIG_PATH=spec/support/tests2png.json jasmine",
"watch": "watch \"echo triggering build && npm run build_test && echo build completed\" src -d -u -w=15",
"perf": "protractor protractor.conf.js",
Expand Down Expand Up @@ -102,6 +103,7 @@
"karma-browserify": "4.4.2",
"karma-chrome-launcher": "0.2.2",
"karma-jasmine": "0.3.6",
"karma-sauce-launcher": "0.3.0",
"lodash": "3.10.1",
"madge": "^0.5.3",
"markdown-doctest": "^0.3.0",
Expand Down