language: python

sudo: false

env:
  matrix:
    - VLUA="lua=5.4"
    - VLUA="lua=5.3"
    - VLUA="lua=5.2"
    - VLUA="lua=5.1"
    - VLUA="luajit=2.1"
    - VLUA="luajit=2.0"

before_install:
  - pip install hererocks
  - hererocks here --luarocks 3 --$VLUA --patch
  - export PATH=$PWD/here/bin:$PATH

  - hererocks tools --luajit=2.0
  - export PATH=$PATH:$PWD/here/bin

install:
  - luarocks --lua-dir=$PWD/tools --tree=$PWD/tools install ldoc
  - luarocks --lua-dir=$PWD/tools --tree=$PWD/tools install luacov
  - luarocks install ansicolors

script:
  - luarocks make --force
  - luarocks install specl
  - specl -vfreport --coverage spec/*_spec.yaml

after_success:
  - bash <(curl -s https://codecov.io/bash) -f luacov.report.out

notifications:
  slack: aspirinc:JyWeNrIdS0J5nf2Pn2BS1cih
