Skip to content

Commit

Permalink
Cleaned-up the CI scripts a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesMessinger committed Oct 19, 2017
1 parent 42a1529 commit 29d5b66
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 20 deletions.
24 changes: 7 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,31 @@ sudo: false
language: node_js
matrix:
include:
# Sauce Labs
# Local Browsers
- node_js: 8
env: KARMA_SAUCE=true KARMA_COVERAGE=false
env: KARMA=true KARMA_COVERAGE=true

# Local Browsers
# Sauce Labs
- node_js: 8
env: KARMA_COVERAGE=true KARMA_SAUCE=false
env: KARMA=true KARMA_SAUCE=true

# Node
- node_js: 4
env: KARMA=false
- node_js: 5
env: KARMA=false
- node_js: 6
env: KARMA=false
- node_js: 7
env: KARMA=false
- node_js: 8
env: KARMA=false

fast_finish: true
allow_failures:
- node_js: 8
env: KARMA_SAUCE=true KARMA_COVERAGE=false
env: KARMA=true KARMA_SAUCE=true

before_script:
# Setup a virtual display for browser testing
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- npm update -g npm
branches:
only:
- master # only run CI on the master branch
- /^PR / # also build pull requests

after_success:
- cat coverage/*/lcov.info > coveralls.txt # concatenate all code-coverage data into a single file
- cat coveralls.txt # output the file contents (for debugging)
- ls -R1 coverage/*/lcov.info # list the files (for debugging)
- cat coveralls.txt | node_modules/coveralls/bin/coveralls.js # send code-coverage data to Coveralls
6 changes: 3 additions & 3 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ var baseConfig = {

module.exports = function (config) {
var debug = process.env.DEBUG ? process.env.DEBUG === 'true' : false;
var karma = process.env.KARMA ? process.env.KARMA === 'true' : true;
var coverage = process.env.KARMA_COVERAGE ? process.env.KARMA_COVERAGE === 'true' : true;
var sauce = process.env.KARMA_SAUCE ? process.env.KARMA_SAUCE === 'true' : true;
var karma = process.env.KARMA ? process.env.KARMA === 'true' : false;
var coverage = process.env.KARMA_COVERAGE ? process.env.KARMA_COVERAGE === 'true' : false;
var sauce = process.env.KARMA_SAUCE ? process.env.KARMA_SAUCE === 'true' : false;
var sauceUsername = process.env.SAUCE_USERNAME;
var sauceAccessKey = process.env.SAUCE_ACCESS_KEY;

Expand Down

0 comments on commit 29d5b66

Please sign in to comment.