From 4320f40844005a452f71e72343e51aa9a5ce2438 Mon Sep 17 00:00:00 2001 From: mpeterv Date: Tue, 9 Jun 2015 21:57:02 +0300 Subject: [PATCH] Update travis config Bump setup scripts, use luacheck. --- .luacheckrc | 2 ++ .travis.yml | 3 ++- .travis_setup.sh | 15 ++++----------- .travis_setup_rocks.sh | 11 +++++++++-- 4 files changed, 17 insertions(+), 14 deletions(-) create mode 100644 .luacheckrc diff --git a/.luacheckrc b/.luacheckrc new file mode 100644 index 0000000..38b295f --- /dev/null +++ b/.luacheckrc @@ -0,0 +1,2 @@ +std = "min" +files["spec/"].std = "+busted" diff --git a/.travis.yml b/.travis.yml index 3c01d8d..5271cba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,4 +14,5 @@ install: - sudo luarocks make script: - - busted spec + - busted + - luacheck src spec diff --git a/.travis_setup.sh b/.travis_setup.sh index 130a7a0..28d9276 100644 --- a/.travis_setup.sh +++ b/.travis_setup.sh @@ -5,8 +5,8 @@ set -e if [ "$LUA" == "LuaJIT 2.0" ]; then - wget -O - http://luajit.org/download/LuaJIT-2.0.3.tar.gz | tar xz - cd LuaJIT-2.0.3 + wget -O - http://luajit.org/download/LuaJIT-2.0.4.tar.gz | tar xz + cd LuaJIT-2.0.4 make && sudo make install INSTALL_TSYMNAME=lua; else if [ "$LUA" == "Lua 5.1" ]; then @@ -23,15 +23,8 @@ else fi cd .. - -if [ "$LUA" == "Lua 5.3" ]; then - git clone https://github.com/keplerproject/luarocks - cd luarocks - git checkout 0f1c93774669468c5165be2711325224388aed41; -else - wget -O - http://luarocks.org/releases/luarocks-2.2.0.tar.gz | tar xz - cd luarocks-2.2.0; -fi +wget -O - http://luarocks.org/releases/luarocks-2.2.2.tar.gz | tar xz +cd luarocks-2.2.2; if [ "$LUA" == "LuaJIT 2.0" ]; then ./configure --with-lua-include=/usr/local/include/luajit-2.0; diff --git a/.travis_setup_rocks.sh b/.travis_setup_rocks.sh index ea23dd5..b221128 100644 --- a/.travis_setup_rocks.sh +++ b/.travis_setup_rocks.sh @@ -1,8 +1,15 @@ -# A script for setting up broken Lua rocks for travis-ci testing. +# A script for setting up Lua rocks for travis-ci testing. sudo luarocks install dkjson --deps-mode=none -git clone https://github.com/Olivine-Labs/busted +mkdir busted +wget -O - https://api.github.com/repos/Olivine-Labs/busted/tarball/master | tar xz -C busted --strip-components=1 cd busted sudo luarocks make busted-scm-0.rockspec cd .. + +mkdir luacheck +wget -O - https://api.github.com/repos/mpeterv/luacheck/tarball/master | tar xz -C luacheck --strip-components=1 +cd luacheck +sudo luarocks make +cd ..