diff --git a/.travis.yml b/.travis.yml index 70c1e993d4..8e0e0ebaf1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,13 +37,11 @@ matrix: cache: directories: - - /usr/local/Cellar/opam - - /usr/local/Cellar/tidy-html5 - - $HOME/travis/.opam - - $HOME/travis/.esy - - $HOME/travis/.nvm - - ./_opam - - ./_build/default + - $HOME/.opam + - $HOME/.esy + - $HOME/.nvm + - ./_opam + - ./_build/default install: - ./test/ci/install-deps.sh diff --git a/test/ci/install-deps.sh b/test/ci/install-deps.sh index 91ff97f2a6..bc20874223 100755 --- a/test/ci/install-deps.sh +++ b/test/ci/install-deps.sh @@ -5,16 +5,11 @@ set -e # Install Tidy everywhere case $TRAVIS_OS_NAME in -"linux") - sudo add-apt-repository -y ppa:robert7/tidy-html5 - sudo apt-get update - sudo apt-get install tidy -;; - -"osx") - brew install tidy-html5 - brew link tidy-html5 -;; + "linux") + sudo add-apt-repository -y ppa:robert7/tidy-html5 + sudo apt-get update + sudo apt-get install tidy + ;; esac # Install esy or opam diff --git a/test/html/test.ml b/test/html/test.ml index 559c426b80..a471657dde 100644 --- a/test/html/test.ml +++ b/test/html/test.ml @@ -35,14 +35,14 @@ module Env = struct | `cases when from_root -> "test/html/cases" | `cases -> "cases" - let running_in_travis = - match Sys.getenv "TRAVIS" with - | "true" -> true + let running_in_travis_on_linux = + match Sys.getenv "TRAVIS_OS_NAME" with + | "linux" -> true | _ -> false | exception Not_found -> false let init () = begin - if running_in_travis && not Tidy.is_present_in_path then begin + if running_in_travis_on_linux && not Tidy.is_present_in_path then begin Alcotest.failf "Could not find `tidy` in $PATH in a CI environment" end;