language: erlang

env:
  global:
    - PLATFORM=linux
    - LUAROCKS_VER=2.1.0
  matrix:
    - LUA=lua5.1 LUA_SFX=
    - LUA=lua5.2 LUA_SFX=
    - LUA=luajit LUA_SFX=jit

branches:
  only:
    - master

before_install:
  - bash .travis/setup_lua.sh
  - sudo pip install cpp-coveralls

install:
  - sudo luarocks install --only-server=http://luarocks.org/repositories/rocks-scm luacov scm
  - sudo luarocks install https://raw.githubusercontent.com/moteus/luacov-coveralls/master/rockspecs/luacov-coveralls-scm-0.rockspec
  - sudo luarocks install lunitx
  - sudo luarocks make rockspecs/foo-scm-0.rockspec CFLAGS="-O2 -fPIC -ftest-coverage -fprofile-arcs" LIBFLAG="-shared --coverage"

script: 
  - cd test
  - lunit.sh -i lua$LUA_SFX test.lua

after_success:
  - coveralls -b .. -r .. --dump c.report.json
  - luacov-coveralls -j c.report.json
  - curl -v --form "json_file=@luacov.report.json;type=application/json" https://coveralls.io/api/v1/jobs

notifications:
  email:
    on_success: change
    on_failure: always

language: erlang

env:
  global:
    - PLATFORM=linux
    - LUAROCKS_VER=2.1.0
  matrix:
    - LUA=lua5.1 LUA_SFX=
    - LUA=lua5.2 LUA_SFX=
    - LUA=luajit LUA_SFX=jit

branches:
  only:
    - master

before_install:
  - bash .travis/setup_lua.sh
  - sudo pip install cpp-coveralls

install:
  - sudo luarocks install https://raw.githubusercontent.com/moteus/luacov/moteus-rockspec/rockspecs/luacov-scm.mot-1.rockspec
  - sudo luarocks install https://raw.githubusercontent.com/moteus/luacov-coveralls/master/rockspecs/luacov-coveralls-scm-0.rockspec
  - sudo luarocks install lunitx
  - sudo luarocks make rockspecs/foo-scm-0.rockspec CFLAGS="-O2 -fPIC -ftest-coverage -fprofile-arcs" LIBFLAG="-shared --coverage"

script: 
  - cd test
  - lunit.sh -i lua$LUA_SFX test.lua

after_success:
  - coveralls -b .. -r .. --dump c.report.json
  - luacov-coveralls -j c.report.json
  - curl -v --form "json_file=@luacov.report.json;type=application/json" https://coveralls.io/api/v1/jobs

notifications:
  email:
    on_success: change
    on_failure: always

Use my fork of LuaCov
Use my fork of LuaCov
