language: c
sudo: false

os:
  - linux

env:
  global:
    - LUAROCKS=2.2.2
  matrix:
    - os=osx LUA=lua5.1  LUANUMBER=double
    - LUA=lua5.1  LUANUMBER=float
    - LUA=lua5.2  LUANUMBER=double
    - LUA=lua5.2  LUANUMBER=float
    - LUA=lua5.3  LUANUMBER=double
    - LUA=lua5.3  LUANUMBER=float
    - LUA=luajit     # latest stable version (2.0.x)
    - LUA=luajit2.0  # current head of 2.0 branch
    - LUA=luajit2.1  # current head of 2.1 branch

# 'bleeding edge' LuaJIT may fail without breaking the build
matrix:
  allow_failures:
    - env: LUA=luajit2.0
    - env: LUA=luajit2.1

before_install:
  - source .travis/setenv_lua.sh
  - luarocks install luacheck
  - luarocks install luacov-coveralls

script: 
  - lua -v -lluacov run_unit_tests.lua
  - lua run_functional_tests.lua --coverage
  - luacheck *.lua test/

after_success:
  - luacov-coveralls -v --include %./luaunit.lua

notifications:
  email:
    on_success: change
    on_failure: always

language: c
sudo: false

os:
  - linux

env:
  global:
    - LUAROCKS=2.2.2
  matrix:
    - LUA=lua5.1  LUANUMBER=double
    - LUA=lua5.1  LUANUMBER=float
    - LUA=lua5.2  LUANUMBER=double
    - LUA=lua5.2  LUANUMBER=float
    - LUA=lua5.3  LUANUMBER=double
    - LUA=lua5.3  LUANUMBER=float
    - LUA=luajit     # latest stable version (2.0.x)
    - LUA=luajit2.0  # current head of 2.0 branch
    - LUA=luajit2.1  # current head of 2.1 branch
    include:
      os=osx 
      - LUA=lua5.1  LUANUMBER=double

# 'bleeding edge' LuaJIT may fail without breaking the build
matrix:
  allow_failures:
    - env: LUA=luajit2.0
    - env: LUA=luajit2.1

before_install:
  - source .travis/setenv_lua.sh
  - luarocks install luacheck
  - luarocks install luacov-coveralls

script: 
  - lua -v -lluacov run_unit_tests.lua
  - lua run_functional_tests.lua --coverage
  - luacheck *.lua test/

after_success:
  - luacov-coveralls -v --include %./luaunit.lua

notifications:
  email:
    on_success: change
    on_failure: always

Test osx build only on one config
Test osx build only on one config