From 155c4878708988674444abc2a2920b785980bd77 Mon Sep 17 00:00:00 2001 From: Peter Melnichenko Date: Fri, 9 Feb 2018 21:00:23 +0300 Subject: Fix CI build and coverage gathering * Default Mac image has been changed on Travis. Use `pip2` instead of `pip`. * Don't install bit32 on Appveyor or luacov-coveralls on Travis. luacov-coveralls isn't used anymore. * Pass luacov.report.out to codecov explicitly on Appveyor, it doesn't find it there. Also disable gcov run. * Use cluacov, should hopefully improve speed and coverage accuracy. * Use the new location for coverage files (testrun instead of test). --- .travis.yml | 10 +++++----- appveyor.yml | 7 +++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3a537b88..c4803b52 100644 --- a/.travis.yml +++ b/.travis.yml @@ -54,13 +54,13 @@ matrix: before_install: - - if [ ! -f lua_install/bin/luarocks ]; then pip install hererocks; fi + - if [ ! -f lua_install/bin/luarocks ]; then pip2 install hererocks; fi - if [ ! -f lua_install/bin/luarocks ]; then hererocks lua_install -r^ --$LUA; fi - export PATH=$PATH:$PWD/lua_install/bin # Add directory with all installed binaries to PATH install: - if [ ! -f lua_install/bin/busted ]; then luarocks install busted; fi - - if [ ! -f lua_install/bin/luacov ]; then luarocks install luacov; luarocks install luacov-coveralls; fi + - if [ ! -f lua_install/bin/luacov ]; then luarocks install cluacov; fi script: - lua -v @@ -70,9 +70,9 @@ script: - busted -o gtest --verbose -Xhelper "lua_dir=$PWD/lua_install,travis,env=full" after_success: - - luacov -c $TRAVIS_BUILD_DIR/test/luacov.config - - cd $TRAVIS_BUILD_DIR/test/ && bash <(curl -s https://codecov.io/bash) - - grep "Summary" -B1 -A1000 $TRAVIS_BUILD_DIR/test/luacov.report.out + - luacov -c $TRAVIS_BUILD_DIR/testrun/luacov.config + - cd $TRAVIS_BUILD_DIR/testrun/ && bash <(curl -s https://codecov.io/bash) + - grep "Summary" -B1 -A1000 $TRAVIS_BUILD_DIR/testrun/luacov.report.out notifications: email: diff --git a/appveyor.yml b/appveyor.yml index 669acd7a..18bb858e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -43,13 +43,12 @@ before_build: build_script: - luarocks install busted 1> NUL 2> NUL + - luarocks install cluacov 1> NUL 2> NUL test_script: - busted -o gtest -v --lpath=.//?.lua --exclude-tags=ssh,unix,mock -Xhelper lua_dir=%CD%\lua_install,appveyor,%COMPILER% after_test: - - if "%LUA%"=="lua 5.1" (luarocks show bit32 || luarocks install bit32) - - luarocks install luacov - pip install codecov - - luacov -c test/luacov.config - - cd test && codecov \ No newline at end of file + - luacov -c testrun/luacov.config + - cd testrun && codecov -f luacov.report.out -X gcov -- cgit v1.2.3-55-g6feb