language: python
sudo: false

env:
  - LUA="lua 5.1"
  - LUA="lua 5.2"
  - LUA="lua 5.3"
  - LUA="luajit 2.0"
  - LUA="luajit 2.1"

before_install:
  - pip install codecov
  - pip install hererocks
  - hererocks lua_install --$LUA -r latest
  - source lua_install/bin/activate
  - luarocks install busted
  - luarocks install cluacov
  - luarocks install luacheck

install:
  - luarocks make

script:
  - luacheck src spec
  - busted -c

after_script:
  - luacov
  - codecov -X gcov
