Skip to content

Commit

Permalink
removed --no-warns, removed --js --python restriction from Travis tests
Browse files Browse the repository at this point in the history
  • Loading branch information
xpl committed Jul 30, 2017
1 parent 82c311c commit fc6fd30
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ before_install:
script:
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then npm config set git-tag-version=false && NPM_VERSION=$(npm version patch); fi
- npm run build
- node run-tests --js --python --no-warns
- node run-tests
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then env COMMIT_MESSAGE=${NPM_VERSION:1} GITHUB_TOKEN=${GITHUB_TOKEN} ./push.sh; fi
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then env COMMIT_MESSAGE=${NPM_VERSION:1} GITHUB_TOKEN=${GITHUB_TOKEN} ./push-wiki.sh; fi
deploy:
Expand Down
20 changes: 11 additions & 9 deletions run-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
A tests launcher. Runs tests for all languages and all markets, in
parallel, with a humanized error reporting.
Usage: node run-tests [--php] [--js] [--python] [--es6] [--no-warns] [market] [symbol]
Usage: node run-tests [--php] [--js] [--python] [--es6] [market] [symbol]
--------------------------------------------------------------------------- */

Expand All @@ -28,7 +28,6 @@ const keys = {
'--php': false, // run PHP tests only
'--python': false, // run Python tests only
'--es6': false, // run JS tests against ccxt.js instead of ccxt.es5.js (no need to `npm run build` before)
'--no-warns': false // supress warnings output
}

let markets = []
Expand Down Expand Up @@ -166,20 +165,23 @@ const testMarket = async (market) => {

log.newline ()

if (!keys['--no-warns']) {
warnings.forEach (t => t.explain ())
}

warnings.forEach (t => t.explain ())
failed.forEach (t => t.explain ())

log.newline ()

if (failed.length) { log.noPretty.bright.red ('FAIL'.bgBrightRed.white, failed .map (t => t.market)) }
if (warnings.length) { log.noPretty.bright.yellow ('WARN'.inverse, warnings.map (t => t.market)) }

log.bright ('\nAll done,', [failed.length && (failed.length + ' failed') .red,
succeeded.length && (succeeded.length + ' succeeded').green,
warnings.length && (warnings.length + ' warnings') .yellow].filter (s => s).join (', '))
log.newline ()

log.bright ('All done,', [failed.length && (failed.length + ' failed') .red,
succeeded.length && (succeeded.length + ' succeeded').green,
warnings.length && (warnings.length + ' warnings') .yellow].filter (s => s).join (', '))

if (failed.length) {

await sleep (2000)
process.exit (1)
}

Expand Down

0 comments on commit fc6fd30

Please sign in to comment.