language: erlang

env:
  global:
    - PLATFORM=linux
    - LUAROCKS_VER=2.2.0beta1
  matrix:
    - LUA=lua5.1
    - LUA=lua5.2
    - LUA=luajit

branches:
  only:
    - master

before_install:
  - .travis/setup_lua.sh
  - sudo pip install cpp-coveralls
  - sudo luarocks install luacov-coveralls --server=http://rocks.moonscript.org/dev
  - sudo luarocks install lunitx

install:
  - sudo luarocks make rockspecs/foo-scm-0.rockspec CFLAGS="-O2 -fPIC -ftest-coverage -fprofile-arcs" LIBFLAG="-shared --coverage"

script: 
  - cd test
  - lunit.sh test.lua

after_success:
  - coveralls -b .. -r .. --dump c.report.json
  - luacov-coveralls -j c.report.json -v

notifications:
  email:
    on_success: change
    on_failure: always

language: erlang

env:
  global:
    - PLATFORM=linux
    - LUAROCKS_VER=2.2.0beta1
  matrix:
    - LUA=lua5.1
    - LUA=lua5.2
    - LUA=luajit

branches:
  only:
    - master

before_install:
  - bash .travis/setup_lua.sh
  - sudo pip install cpp-coveralls
  - sudo luarocks install luacov-coveralls --server=http://rocks.moonscript.org/dev
  - sudo luarocks install lunitx

install:
  - sudo luarocks make rockspecs/foo-scm-0.rockspec CFLAGS="-O2 -fPIC -ftest-coverage -fprofile-arcs" LIBFLAG="-shared --coverage"

script: 
  - cd test
  - lunit.sh test.lua

after_success:
  - coveralls -b .. -r .. --dump c.report.json
  - luacov-coveralls -j c.report.json -v

notifications:
  email:
    on_success: change
    on_failure: always

Use `bash` to run setup_lua script.
Use `bash` to run setup_lua script.
