language: generic

addons:
  apt_packages:
  - cabal-install
  - ghc
  - zsh
  - ksh

cache:
  directories:
    - $HOME/.ghc
    - $HOME/.cabal

before_install:
  - wget --version
  - curl --version
  - export __luaver_env="testing"
  - if [[ -n $SHELLCHECK ]]; then cabal update && cabal install transformers-0.4.3.0 ShellCheck && shellcheck --version; fi

install:
  - if [[ $SHELL == bash ]]; then git clone --depth 1 https://github.com/sstephenson/bats.git; fi
  - . ./install.sh

script:
  - if [[ -n $SHELLCHECK ]]; then shellcheck -s bash luaver && shellcheck -s dash luaver && shellcheck -s ksh luaver && shellcheck -s sh luaver; fi
  - if [[ -n $SHELLCHECK ]]; then shellcheck -s bash install.sh && shellcheck -s dash install.sh && shellcheck -s ksh install.sh && shellcheck -s sh install.sh; fi
  - if [[ -z $SHELLCHECK ]] && [[ $SHELL == bash ]]; then ./bats/bin/bats tests; fi
  - if [[ -z $SHELLCHECK ]]; then $SHELL ./tests/integration\ tests/test.sh; fi

env:
  global:
    - PATH="$HOME/.cabal/bin:$PATH"
  matrix:
    - SHELL=bash
    - SHELL=zsh
    - SHELL=sh
    - SHELLCHECK=true

language: generic

addons:
  apt_packages:
  - cabal-install
  - ghc
  - zsh
  - ksh

cache:
  directories:
    - $HOME/.ghc
    - $HOME/.cabal

before_install:
  - wget --version
  - curl --version
  - export __luaver_env="testing"
  - if [[ -n $SHELLCHECK ]]; then cabal update && cabal install transformers-0.4.3.0 ShellCheck && shellcheck --version; fi

install:
  - if [[ $SHELL == bash ]]; then git clone --depth 1 https://github.com/sstephenson/bats.git; fi
  - . ./install.sh

script:
  - if [[ -n $SHELLCHECK ]]; then shellcheck -s bash luaver && shellcheck -s dash luaver && shellcheck -s ksh luaver && shellcheck -s sh -e SC2039 luaver; fi
  - if [[ -n $SHELLCHECK ]]; then shellcheck -s bash install.sh && shellcheck -s dash install.sh && shellcheck -s ksh install.sh && shellcheck -s sh -e SC2039 install.sh; fi
  - if [[ -z $SHELLCHECK ]] && [[ $SHELL == bash ]]; then ./bats/bin/bats tests; fi
  - if [[ -z $SHELLCHECK ]]; then $SHELL ./tests/integration\ tests/test.sh; fi

env:
  global:
    - PATH="$HOME/.cabal/bin:$PATH"
  matrix:
    - SHELL=bash
    - SHELL=zsh
    - SHELL=sh
    - SHELLCHECK=true

Disable shellcheck warning for 'local' in sh shell
Disable shellcheck warning for 'local' in sh shell
