deno_install/.travis.yml
2019-01-15 18:38:22 -05:00

55 lines
1.6 KiB
YAML

matrix:
include:
- language: python
os:
- linux
# Travis does not support python on osx yet.
# see: https://github.com/travis-ci/travis-ci/issues/2312
# - osx
python:
- "2.7"
- "3.3"
# Test the install script.
script:
- ./install.py
- ./install_test.py
- language: sh
os:
- linux
addons:
apt:
packages:
- ksh
- zsh
env:
- PATH=$HOME/bin/:$PATH
- SHFMT_VERSION=v2.6.2
- SHFMT_DOWNLOAD_URL="https://github.com/mvdan/sh/releases/download/${SHFMT_VERSION}/shfmt_${SHFMT_VERSION}_linux_amd64"
before_script:
- $SHELL --version 2>/dev/null || dpkg -s "$SHELL" 2>/dev/null || command -v "$SHELL"
- curl --version
- shellcheck --version
- curl -sSL "$SHFMT_DOWNLOAD_URL" -o $HOME/bin/shfmt;
chmod +x $HOME/bin/shfmt;
shfmt --version
script:
- echo "Linting installer script using \`shellcheck\`:";
shellcheck -s sh *.sh;
shellcheck -s dash *.sh;
shellcheck -s ksh *.sh;
shellcheck -s bash *.sh
- echo "Checking script formatting using \`shfmt\`:";
shfmt -d -p -i 2 -ci .
- echo "Running test suite inside supported shells:";
echo "\`sh\`:"; sh ./install_test.sh;
echo "\`dash\`:"; dash ./install_test.sh;
echo "\`ksh\`:"; ksh ./install_test.sh;
echo "\`bash\`:"; bash ./install_test.sh;
echo "\`zsh\`:"; zsh ./install_test.sh
- language: bash
os:
- osx
script:
- ./install_test.sh