File tree 5 files changed +63
-6
lines changed
5 files changed +63
-6
lines changed Original file line number Diff line number Diff line change 40
40
chmod +x nvim.appimage
41
41
mv nvim.appimage ./build/nvim
42
42
}
43
- git clone https://github.com/MunifTanjim/nui.nvim ~/.local/share/nvim/site/pack/vendor/start/nui.nvim
44
- git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim
45
- ln -s $(pwd) ~/.local/share/nvim/site/pack/vendor/start
46
43
47
44
- name : Run tests
48
45
run : |
49
46
export PATH="${PWD}/build/:${PATH}"
50
- make test
47
+ ./scripts/ test.sh
Original file line number Diff line number Diff line change @@ -41,3 +41,6 @@ luac.out
41
41
42
42
# Vim tag files
43
43
tags
44
+
45
+ # Others
46
+ .testcache
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -euo pipefail
4
+
5
+ while [[ $# -gt 0 ]]; do
6
+ case " ${1} " in
7
+ --clean)
8
+ shift
9
+ echo " [test] cleaning up environment"
10
+ rm -rf ./.testcache
11
+ echo " [test] envionment cleaned"
12
+ ;;
13
+ * )
14
+ shift
15
+ ;;
16
+ esac
17
+ done
18
+
19
+ function setup_environment() {
20
+ echo
21
+ echo " [test] setting up environment"
22
+ echo
23
+
24
+ local plugins_dir=" ./.testcache/site/pack/vendor/start"
25
+ if [[ ! -d " ${plugins_dir} " ]]; then
26
+ mkdir -p " ${plugins_dir} "
27
+ fi
28
+
29
+ if [[ ! -d " ${plugins_dir} /nui.nvim" ]]; then
30
+ echo " [plugins] nui.nvim: installing..."
31
+ git clone https://github.com/MunifTanjim/nui.nvim " ${plugins_dir} /nui.nvim"
32
+ echo " [plugins] nui.nvim: installed"
33
+ echo
34
+ fi
35
+
36
+ if [[ ! -d " ${plugins_dir} /plenary.nvim" ]]; then
37
+ echo " [plugins] plenary.nvim: installing..."
38
+ git clone https://github.com/nvim-lua/plenary.nvim " ${plugins_dir} /plenary.nvim"
39
+ echo " [plugins] plenary.nvim: installed"
40
+ echo
41
+ fi
42
+
43
+ echo " [test] environment ready"
44
+ echo
45
+ }
46
+
47
+ setup_environment
48
+
49
+ make test
Original file line number Diff line number Diff line change 1
1
-- Need the absolute path as when doing the testing we will issue things like `tcd` to change directory
2
2
-- to where our temporary filesystem lives
3
+ local root_dir = vim .fn .fnamemodify (vim .trim (vim .fn .system (" git rev-parse --show-toplevel" )), " :p" )
4
+
5
+ vim .opt .packpath :prepend (string.format (" %s" , root_dir .. " .testcache/site" ))
6
+
3
7
vim .opt .rtp = {
4
- vim . fn . fnamemodify ( vim . trim ( vim . fn . system ( " git rev-parse --show-toplevel " )), " :p " ) ,
8
+ root_dir ,
5
9
vim .env .VIMRUNTIME ,
6
10
}
7
11
Original file line number Diff line number Diff line change 1
1
-- Need the absolute path as when doing the testing we will issue things like `tcd` to change directory
2
2
-- to where our temporary filesystem lives
3
+ local root_dir = vim .fn .fnamemodify (vim .trim (vim .fn .system (" git rev-parse --show-toplevel" )), " :p" )
4
+
5
+ vim .opt .packpath :prepend (string.format (" %s" , root_dir .. " .testcache/site" ))
6
+
3
7
vim .opt .rtp = {
4
- vim . fn . fnamemodify ( vim . trim ( vim . fn . system ( " git rev-parse --show-toplevel " )), " :p " ) ,
8
+ root_dir ,
5
9
vim .env .VIMRUNTIME ,
6
10
}
7
11
You can’t perform that action at this time.
0 commit comments