From 6c4a3e8a1b2ef2f9227594a4198e8588032926d7 Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Fri, 13 Jul 2018 01:18:07 +0200 Subject: Execute tests on various ZSH versions --- .travis.yml | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 64 insertions(+), 9 deletions(-) (limited to '.travis.yml') diff --git a/.travis.yml b/.travis.yml index 648499ab..ab330f9c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,23 +1,78 @@ -sudo: true -dist: trusty language: sh + +os: + - linux + - osx + addons: apt: packages: - build-essential + - git + - mercurial + - subversion + - jq + - node + - golang + - ruby + - python + - python-virtualenv + +before_install: + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi + +env: + global: + - ZSH_DIST=$HOME/.zshdist + matrix: + # Use _ZSH_VERSION since if ZSH_VERSION is present, travis cacher thinks it + # is running in zsh and tries to use zsh specific functions. + - _ZSH_VERSION=5.5.1 + - _ZSH_VERSION=5.5 + - _ZSH_VERSION=5.4.2 + - _ZSH_VERSION=5.4.1 + - _ZSH_VERSION=5.3.1 + - _ZSH_VERSION=5.3 + - _ZSH_VERSION=5.2 + - _ZSH_VERSION=5.1.1 + - _ZSH_VERSION=5.0.8 + - _ZSH_VERSION=5.0.2 + +cache: + directories: + - $ZSH_DIST before_script: + - > + setup_zsh() { + dest="$ZSH_DIST/$1" + if [[ ! -d $dest/bin ]]; then + coreutils_mktemp="mktemp" + if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then + coreutils_mktemp="gmktemp" + fi + tmp="$(${coreutils_mktemp} --directory --tmpdir="${TMPDIR:/tmp}" zshbuild.XXXXXX)" + ( + cd "$tmp" && + curl -L http://downloads.sourceforge.net/zsh/zsh-${1}.tar.gz | tar zx && + cd zsh-$1 && + ./configure --prefix="$dest" && + make && + mkdir -p "$dest" && + make install || + echo "Failed to build zsh-${1}!" + ) + fi + export PATH="$dest/bin:$PATH" + } + - setup_zsh $_ZSH_VERSION # Show the git version being used to test. - "git --version" + # Show the mercurial version being used to test. + - "hg --version" # Show the zsh version being used to test. - "zsh --version" -install: - - "sudo apt-get update -qq" - - "sudo apt-get install -y zsh" - - "sudo chsh -s $(which zsh)" - - "sudo apt-get install -y git mercurial subversion jq node golang ruby python python-virtualenv" - script: - test/powerlevel9k.spec - test/functions/utilities.spec @@ -29,4 +84,4 @@ script: - test/segments/go_version.spec - test/segments/vcs.spec - test/segments/kubecontext.spec - - test/segments/laravel_version.spec + - test/segments/laravel_version.spec \ No newline at end of file -- cgit v1.2.3 From 21f2d1a377294c5adea3a8a225e04cabc4cc4797 Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Sun, 15 Jul 2018 22:23:24 +0200 Subject: Test all *.spec files on travis --- .travis.yml | 12 +----------- test/suite.spec | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 11 deletions(-) create mode 100755 test/suite.spec (limited to '.travis.yml') diff --git a/.travis.yml b/.travis.yml index ab330f9c..ac94f261 100644 --- a/.travis.yml +++ b/.travis.yml @@ -74,14 +74,4 @@ before_script: - "zsh --version" script: - - test/powerlevel9k.spec - - test/functions/utilities.spec - - test/functions/colors.spec - - test/functions/icons.spec - - test/segments/command_execution_time.spec - - test/segments/dir.spec - - test/segments/rust_version.spec - - test/segments/go_version.spec - - test/segments/vcs.spec - - test/segments/kubecontext.spec - - test/segments/laravel_version.spec \ No newline at end of file + - test/suite.spec \ No newline at end of file diff --git a/test/suite.spec b/test/suite.spec new file mode 100755 index 00000000..7e139889 --- /dev/null +++ b/test/suite.spec @@ -0,0 +1,15 @@ +#!/usr/bin/env zsh +#vim:ft=zsh ts=2 sw=2 sts=2 et fenc=utf-8 + +local failed=false + +for test in **/*.spec; do + if [[ "${test}" == "test/suite.spec" ]]; then + continue; + fi + ./${test} || failed=true +done + +if [[ "${failed}" == "true" ]]; then + exit 1 +fi \ No newline at end of file -- cgit v1.2.3 From 84c8ddce70415c9c66f4b34e8168824fad284bd8 Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Fri, 20 Jul 2018 21:16:42 +0200 Subject: Drop support for ZSH < 5.1 --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) (limited to '.travis.yml') diff --git a/.travis.yml b/.travis.yml index 7c526e54..0da3abe6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,8 +35,6 @@ env: - _ZSH_VERSION=5.3 - _ZSH_VERSION=5.2 - _ZSH_VERSION=5.1.1 - - _ZSH_VERSION=5.0.8 - - _ZSH_VERSION=5.0.2 cache: directories: -- cgit v1.2.3 From 3c991f902c967f184e7933183b09b5cb96673bf7 Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Sun, 5 Aug 2018 22:26:17 +0200 Subject: Make Travis use XCode9.4 --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) (limited to '.travis.yml') diff --git a/.travis.yml b/.travis.yml index 0da3abe6..30631ea8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,8 @@ os: - linux - osx +osx_image: xcode9.4 + addons: apt: packages: -- cgit v1.2.3