From a7b6d2c2cec0a5dc8e522789c533d82ee841e259 Mon Sep 17 00:00:00 2001 From: Glavin Wiechert Date: Sat, 14 May 2016 13:53:15 -0300 Subject: [PATCH] Update Travis CI scripts and config --- .travis.yml | 26 +++++++++++++++++--------- build-package.sh | 28 +++++++++++++++++++++++++++- 2 files changed, 44 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0f28ae6..338c594 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,3 @@ -language: objective-c - -osx_image: xcode7.3 - -sudo: false - -git: - depth: 10 - notifications: webhooks: urls: @@ -20,6 +11,15 @@ notifications: script: sh build-package.sh +git: + depth: 10 + +sudo: false + +os: + - linux + - osx + env: global: - APM_TEST_PACKAGES="language-marko language-html-swig language-svg language-d mavensmate-atom" @@ -27,6 +27,14 @@ env: - ATOM_CHANNEL=stable - ATOM_CHANNEL=beta +addons: + apt: + packages: + - build-essential + - git + - libgnome-keyring-dev + - fakeroot + cache: - pip: true - bundler: true diff --git a/build-package.sh b/build-package.sh index b135968..98674d1 100644 --- a/build-package.sh +++ b/build-package.sh @@ -72,6 +72,32 @@ if [ -f ./node_modules/.bin/coffeelint ]; then fi fi +if [ -f ./node_modules/.bin/eslint ]; then + if [ -d ./src ]; then + echo "Linting package..." + ./node_modules/.bin/eslint src + rc=$?; if [ $rc -ne 0 ]; then exit $rc; fi + fi + if [ -d ./spec ]; then + echo "Linting package specs..." + ./node_modules/.bin/eslint spec + rc=$?; if [ $rc -ne 0 ]; then exit $rc; fi + fi +fi + +if [ -f ./node_modules/.bin/standard ]; then + if [ -d ./src ]; then + echo "Linting package..." + ./node_modules/.bin/standard "src/**/*.js" + rc=$?; if [ $rc -ne 0 ]; then exit $rc; fi + fi + if [ -d ./spec ]; then + echo "Linting package specs..." + ./node_modules/.bin/standard "spec/**/*.js" + rc=$?; if [ $rc -ne 0 ]; then exit $rc; fi + fi +fi + if [ -d ./spec ]; then echo "Running specs..." "$ATOM_SCRIPT_PATH" --test spec @@ -79,4 +105,4 @@ else echo "Missing spec folder! Please consider adding a test suite in `./spec`" exit 1 fi -exit +exit \ No newline at end of file