os: linux
language: perl
perl:
  - 5.24
  - 5.22
  - 5.20
  - 5.18
  - 5.14

matrix:
  include:
    - os: osx
      osx_image: xcode7.3
      language: generic
      perl: 5.24

before_install:
  - git clone --depth 1 https://github.com/sstephenson/bats.git
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
      brew update;
      brew install shellcheck perl cpanminus;
      mkdir -p ~/perl5;
    fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
      sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ trusty-backports restricted main universe";
      sudo apt-get -y update;
      sudo apt-get -y install shellcheck;
    fi
install:
  - cpanm --quiet --notest --local-lib=~/perl5 local::lib
  - eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
  - cpanm --quiet --notest Test::Perl::Critic Perl::Critic::Freenode
script:
  - ./bats/bin/bats test/*.bats
  - perlcritic -1 -q --theme freenode diff-so-fancy

os: linux
language: perl
perl:
  - dev
  - 5.26
  - 5.24
  - 5.22
  - 5.20
  - 5.18
  - 5.14

matrix:
  include:
    - os: osx
      osx_image: xcode7.3
      language: generic
      perl: 5.24

before_install:
  - git clone --depth 1 https://github.com/sstephenson/bats.git
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
      brew update;
      brew install shellcheck perl cpanminus;
      mkdir -p ~/perl5;
    fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
      sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ trusty-backports restricted main universe";
      sudo apt-get -y update;
      sudo apt-get -y install shellcheck;
    fi
install:
  - cpanm --quiet --notest --local-lib=~/perl5 local::lib
  - eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
  - cpanm --quiet --notest Test::Perl::Critic Perl::Critic::Freenode
script:
  - ./bats/bin/bats test/*.bats
  - perlcritic -1 -q --theme freenode diff-so-fancy

Test on Perl 5.26 and the latest dev
Test on Perl 5.26 and the latest dev

Per: https://github.com/travis-perl/helpers
