From ce5b37239ec4214ef1db1a460c71056ec5135489 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Sun, 1 May 2016 22:53:43 -0700 Subject: [PATCH] chore: add lint job to travis --- .travis.yml | 1 + scripts/ci-lite/lint.sh | 15 +++++++++++++++ scripts/ci-lite/test.sh | 1 + 3 files changed, 17 insertions(+) create mode 100755 scripts/ci-lite/lint.sh diff --git a/.travis.yml b/.travis.yml index 139de1c3b9..220d6de02a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,6 +37,7 @@ env: matrix: # Order: a slower build first, so that we don't occupy an idle travis worker waiting for others to complete. - CI_MODE=js + - CI_MODE=lint # - CI_MODE=dart - CI_MODE=build_only - CI_MODE=saucelabs_required diff --git a/scripts/ci-lite/lint.sh b/scripts/ci-lite/lint.sh new file mode 100755 index 0000000000..f69c585d61 --- /dev/null +++ b/scripts/ci-lite/lint.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +set -ex -o pipefail + +if [[ ${TRAVIS} && ${CI_MODE} != "lint" ]]; then + exit 0; +fi + + +echo 'travis_fold:start:lint' + +gulp lint +gulp check-format + +echo 'travis_fold:end:lint' diff --git a/scripts/ci-lite/test.sh b/scripts/ci-lite/test.sh index 6a13058ef2..8670368918 100755 --- a/scripts/ci-lite/test.sh +++ b/scripts/ci-lite/test.sh @@ -9,6 +9,7 @@ cd `dirname $0` source ./env.sh cd ../.. +./scripts/ci-lite/lint.sh ./scripts/ci-lite/test_js.sh ./scripts/ci-lite/test_build_only.sh ./scripts/ci-lite/test_saucelabs.sh