From 24ad42b0ad494e408558bb1edf88c56e7b45ad5d Mon Sep 17 00:00:00 2001 From: nucular Date: Wed, 27 Aug 2014 15:23:41 +0200 Subject: [PATCH] Start adding unit testing with busted and Travis-CI --- .travis.yml | 35 +++++++++++++++++++++++++++++++++++ spec/sfxr_spec.lua | 4 ++++ 2 files changed, 39 insertions(+) create mode 100644 .travis.yml create mode 100644 spec/sfxr_spec.lua diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..f95404e --- /dev/null +++ b/.travis.yml @@ -0,0 +1,35 @@ +language: erlang + +env: + global: + - LUAROCKS_BASE=luarocks-2.0.13 + matrix: + - LUA=lua5.1 LUA_DEV=liblua5.1-dev LUA_VER=5.1 LUA_SFX=5.1 LUA_INCDIR=/usr/include/lua5.1 + - LUA=lua5.2 LUA_DEV=liblua5.2-dev LUA_VER=5.2 LUA_SFX=5.2 LUA_INCDIR=/usr/include/lua5.2 + - LUA=luajit LUA_DEV=libluajit-5.1-dev LUA_VER=5.1 LUA_SFX=jit LUA_INCDIR=/usr/include/luajit-2.0 + +before_install: + - if [ $LUA = "luajit" ]; then + sudo add-apt-repository ppa:mwild1/ppa -y && sudo apt-get update -y; + fi + - sudo apt-get install $LUA + - sudo apt-get install $LUA_DEV + - lua$LUA_SFX -v + # Install a recent luarocks release + - wget http://luarocks.org/releases/$LUAROCKS_BASE.tar.gz + - tar zxvpf $LUAROCKS_BASE.tar.gz + - cd $LUAROCKS_BASE + - ./configure + --lua-version=$LUA_VER --lua-suffix=$LUA_SFX --with-lua-include="$LUA_INCDIR" + - sudo make + - sudo make install + - cd $TRAVIS_BUILD_DIR + +install: + - sudo -E luarocks install busted + +script: + - sudo -E busted -v + +notifications: + email: false diff --git a/spec/sfxr_spec.lua b/spec/sfxr_spec.lua new file mode 100644 index 0000000..76bd5c5 --- /dev/null +++ b/spec/sfxr_spec.lua @@ -0,0 +1,4 @@ +require("busted") + +describe("Dynamic sound generator for Lua", function() +end)