From b1fee8b857ea090ffd3c7534390f55aee05f445c Mon Sep 17 00:00:00 2001 From: Bruno Pinto Date: Sat, 17 Jan 2015 01:21:03 -0200 Subject: [PATCH] running tests on linux and osx --- .travis.yml | 6 +++++- script/bootstrap.sh | 14 ++++++++++---- script/run-tests.fish | 5 ----- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index a5a18be..07edaf3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,11 @@ language: c +os: + - linux + - osx + env: - - FISH_PPA=nightly-master + - FISH_PPA=nightly-master BREW_OPTIONS=--HEAD before_install: - script/bootstrap.sh diff --git a/script/bootstrap.sh b/script/bootstrap.sh index d8f9e80..cb130b7 100755 --- a/script/bootstrap.sh +++ b/script/bootstrap.sh @@ -1,6 +1,12 @@ #!/usr/bin/env bash -ppa=ppa:fish-shell/${FISH_PPA:-nightly-master} -sudo add-apt-repository -y $ppa -sudo apt-get update -sudo apt-get -y install fish + +if [ "$TRAVIS_OS_NAME" = "linux" ]; then + ppa=ppa:fish-shell/$FISH_PPA + sudo add-apt-repository -y $ppa + sudo apt-get update + sudo apt-get -y install fish +else + brew install fish $BREW_OPTIONS +fi + curl -L https://github.com/$TRAVIS_REPO_SLUG/raw/$TRAVIS_BRANCH/tools/install.fish | fish diff --git a/script/run-tests.fish b/script/run-tests.fish index bb4ad23..6de5152 100755 --- a/script/run-tests.fish +++ b/script/run-tests.fish @@ -1,10 +1,5 @@ #!/usr/bin/env fish -# When running on CI, run tests from the correct branch -if set -q TRAVIS_BRANCH - command git checkout $TRAVIS_BRANCH -end - set -l result 0 for test in (find * -type f -print | grep "spec.fish") fish $test $argv