Skip to content

Commit

Permalink
attempt to separate the Node and Browser tests in Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
TooTallNate committed Aug 8, 2017
1 parent d73c4ae commit f178d86
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 13 deletions.
13 changes: 10 additions & 3 deletions .travis.yml
@@ -1,14 +1,21 @@
sudo: false

language: node_js

node_js:
- "6"
- "5"
- "4"
- "6"
- "8"

install:
- make node_modules
- make install

script:
- make lint
- make test
- make coveralls

matrix:
include:
- node_js: '8'
env: BROWSER=1
25 changes: 15 additions & 10 deletions Makefile
Expand Up @@ -30,24 +30,29 @@ dist/debug.js: src/*.js node_modules
. > dist/debug.js

lint:
eslint *.js src/*.js
@eslint *.js src/*.js

test-node:
istanbul cover node_modules/mocha/bin/_mocha -- test/**.js
@istanbul cover node_modules/mocha/bin/_mocha -- test/**.js
@cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js

test-browser:
$(MAKE) browser
karma start --single-run
@$(MAKE) browser
@karma start --single-run

test:
concurrently \
test-all:
@concurrently \
"make test-node" \
"make test-browser"

coveralls:
cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
test:
@if [ "x$(BROWSER_NAME)" = "x" ]; then \
$(MAKE) test-node; \
else \
$(MAKE) test-browser; \
fi

clean:
rimraf dist
rimraf dist coverage

.PHONY: browser install clean coveralls lint test test-node test-browser
.PHONY: browser install clean lint test test-all test-node test-browser

0 comments on commit f178d86

Please sign in to comment.