File tree 9 files changed +76
-0
lines changed
9 files changed +76
-0
lines changed Original file line number Diff line number Diff line change
1
+ coverage :
2
+ status :
3
+ project :
4
+ default :
5
+ informational : true
6
+ only_pulls : true
7
+ patch :
8
+ default :
9
+ informational : true
10
+ only_pulls : true
Original file line number Diff line number Diff line change 41
41
mv nvim.appimage ./build/nvim
42
42
}
43
43
44
+ - name : Get Luver Cache Key
45
+ id : luver-cache-key
46
+ env :
47
+ CI_RUNNER_OS : ${{ runner.os }}
48
+ run : |
49
+ echo "::set-output name=value::${CI_RUNNER_OS}-luver-v1-$(date -u +%Y-%m-%d)"
50
+ shell : bash
51
+ - name : Setup Luver Cache
52
+ uses : actions/cache@v2
53
+ with :
54
+ path : ~/.local/share/luver
55
+ key : ${{ steps.luver-cache-key.outputs.value }}
56
+ - name : Setup Lua
57
+ uses : MunifTanjim/luver-action@v1
58
+ with :
59
+ default : 5.1.5
60
+ lua_versions : 5.1.5
61
+ luarocks_versions : 5.1.5:3.8.0
62
+ - name : Setup luacov
63
+ run : |
64
+ luarocks install luacov
65
+
44
66
- name : Run tests
45
67
run : |
46
68
export PATH="${PWD}/build/:${PATH}"
47
69
./scripts/test.sh
70
+
71
+ - name : Upload coverage to Codecov
72
+ uses : codecov/codecov-action@v2
Original file line number Diff line number Diff line change 44
44
45
45
# Others
46
46
.testcache
47
+ luacov. * .out
Original file line number Diff line number Diff line change
1
+ include = {
2
+ "lua%/neo%-tree",
3
+ }
Original file line number Diff line number Diff line change 2
2
3
3
set -euo pipefail
4
4
5
+ luacov_dir=" "
6
+
5
7
while [[ $# -gt 0 ]]; do
6
8
case " ${1} " in
7
9
--clean)
@@ -36,6 +38,8 @@ function setup_environment() {
36
38
if [[ ! -d " ${plugins_dir} /plenary.nvim" ]]; then
37
39
echo " [plugins] plenary.nvim: installing..."
38
40
git clone https://github.com/nvim-lua/plenary.nvim " ${plugins_dir} /plenary.nvim"
41
+ # this commit broke luacov
42
+ git -C " ${plugins_dir} /plenary.nvim" revert --no-commit 9069d14a120cadb4f6825f76821533f2babcab92
39
43
echo " [plugins] plenary.nvim: installed"
40
44
echo
41
45
fi
@@ -44,6 +48,31 @@ function setup_environment() {
44
48
echo
45
49
}
46
50
51
+ function luacov_start() {
52
+ luacov_dir=" $( dirname " $( luarocks which luacov 2> /dev/null | head -1) " ) "
53
+ if [[ " ${luacov_dir} " == " ." ]]; then
54
+ luacov_dir=" "
55
+ fi
56
+
57
+ if test -n " ${luacov_dir} " ; then
58
+ rm -f luacov.* .out
59
+ export LUA_PATH=" ;;${luacov_dir} /?.lua"
60
+ fi
61
+ }
62
+
63
+ function luacov_end() {
64
+ if test -n " ${luacov_dir} " ; then
65
+ luacov
66
+
67
+ echo
68
+ tail -n +$(( $(grep - n "^Summary$" luacov.report.out | cut - d": " - f1 ) - 1 )) luacov.report.out
69
+ fi
70
+ }
71
+
47
72
setup_environment
48
73
74
+ luacov_start
75
+
49
76
make test
77
+
78
+ luacov_end
Original file line number Diff line number Diff line change
1
+ pcall (require , " luacov" )
2
+
1
3
local Path = require (" plenary.path" )
2
4
local util = require (" tests.helpers.util" )
3
5
local verify = require (" tests.helpers.verify" )
Original file line number Diff line number Diff line change
1
+ pcall (require , " luacov" )
2
+
1
3
local util = require (" tests.helpers.util" )
2
4
local verify = require (" tests.helpers.verify" )
3
5
local config = require (" neo-tree" ).config
Original file line number Diff line number Diff line change
1
+ pcall (require , " luacov" )
2
+
1
3
local util = require (" tests.helpers.util" )
2
4
local verify = require (" tests.helpers.verify" )
3
5
local config = require (" neo-tree" ).config
Original file line number Diff line number Diff line change
1
+ pcall (require , " luacov" )
2
+
1
3
local util = require (" tests.helpers.util" )
2
4
local verify = require (" tests.helpers.verify" )
3
5
local utils = require (" neo-tree.utils" )
You can’t perform that action at this time.
0 commit comments