diff options
author | Peter Melnichenko <mpeterval@gmail.com> | 2018-02-09 21:00:23 +0300 |
---|---|---|
committer | Peter Melnichenko <mpeterval@gmail.com> | 2018-02-10 15:24:42 +0300 |
commit | 155c4878708988674444abc2a2920b785980bd77 (patch) | |
tree | 6b90d550fec66347be2a25d53a49751f3fbd0d27 | |
parent | 4c22bfb86abcd97253c73d2175d0a715c2a2cc12 (diff) | |
download | luarocks-155c4878708988674444abc2a2920b785980bd77.tar.gz luarocks-155c4878708988674444abc2a2920b785980bd77.tar.bz2 luarocks-155c4878708988674444abc2a2920b785980bd77.zip |
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).
-rw-r--r-- | .travis.yml | 10 | ||||
-rw-r--r-- | 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: | |||
54 | 54 | ||
55 | 55 | ||
56 | before_install: | 56 | before_install: |
57 | - if [ ! -f lua_install/bin/luarocks ]; then pip install hererocks; fi | 57 | - if [ ! -f lua_install/bin/luarocks ]; then pip2 install hererocks; fi |
58 | - if [ ! -f lua_install/bin/luarocks ]; then hererocks lua_install -r^ --$LUA; fi | 58 | - if [ ! -f lua_install/bin/luarocks ]; then hererocks lua_install -r^ --$LUA; fi |
59 | - export PATH=$PATH:$PWD/lua_install/bin # Add directory with all installed binaries to PATH | 59 | - export PATH=$PATH:$PWD/lua_install/bin # Add directory with all installed binaries to PATH |
60 | 60 | ||
61 | install: | 61 | install: |
62 | - if [ ! -f lua_install/bin/busted ]; then luarocks install busted; fi | 62 | - if [ ! -f lua_install/bin/busted ]; then luarocks install busted; fi |
63 | - if [ ! -f lua_install/bin/luacov ]; then luarocks install luacov; luarocks install luacov-coveralls; fi | 63 | - if [ ! -f lua_install/bin/luacov ]; then luarocks install cluacov; fi |
64 | 64 | ||
65 | script: | 65 | script: |
66 | - lua -v | 66 | - lua -v |
@@ -70,9 +70,9 @@ script: | |||
70 | - busted -o gtest --verbose -Xhelper "lua_dir=$PWD/lua_install,travis,env=full" | 70 | - busted -o gtest --verbose -Xhelper "lua_dir=$PWD/lua_install,travis,env=full" |
71 | 71 | ||
72 | after_success: | 72 | after_success: |
73 | - luacov -c $TRAVIS_BUILD_DIR/test/luacov.config | 73 | - luacov -c $TRAVIS_BUILD_DIR/testrun/luacov.config |
74 | - cd $TRAVIS_BUILD_DIR/test/ && bash <(curl -s https://codecov.io/bash) | 74 | - cd $TRAVIS_BUILD_DIR/testrun/ && bash <(curl -s https://codecov.io/bash) |
75 | - grep "Summary" -B1 -A1000 $TRAVIS_BUILD_DIR/test/luacov.report.out | 75 | - grep "Summary" -B1 -A1000 $TRAVIS_BUILD_DIR/testrun/luacov.report.out |
76 | 76 | ||
77 | notifications: | 77 | notifications: |
78 | email: | 78 | 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: | |||
43 | 43 | ||
44 | build_script: | 44 | build_script: |
45 | - luarocks install busted 1> NUL 2> NUL | 45 | - luarocks install busted 1> NUL 2> NUL |
46 | - luarocks install cluacov 1> NUL 2> NUL | ||
46 | 47 | ||
47 | test_script: | 48 | test_script: |
48 | - busted -o gtest -v --lpath=.//?.lua --exclude-tags=ssh,unix,mock -Xhelper lua_dir=%CD%\lua_install,appveyor,%COMPILER% | 49 | - busted -o gtest -v --lpath=.//?.lua --exclude-tags=ssh,unix,mock -Xhelper lua_dir=%CD%\lua_install,appveyor,%COMPILER% |
49 | 50 | ||
50 | after_test: | 51 | after_test: |
51 | - if "%LUA%"=="lua 5.1" (luarocks show bit32 || luarocks install bit32) | ||
52 | - luarocks install luacov | ||
53 | - pip install codecov | 52 | - pip install codecov |
54 | - luacov -c test/luacov.config | 53 | - luacov -c testrun/luacov.config |
55 | - cd test && codecov \ No newline at end of file | 54 | - cd testrun && codecov -f luacov.report.out -X gcov |