File tree Expand file tree Collapse file tree 5 files changed +63
-6
lines changed Expand file tree Collapse file tree 5 files changed +63
-6
lines changed Original file line number Diff line number Diff line change 4040 chmod +x nvim.appimage
4141 mv nvim.appimage ./build/nvim
4242 }
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
4643
4744 - name : Run tests
4845 run : |
4946 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
4141
4242# Vim tag files
4343tags
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 11-- Need the absolute path as when doing the testing we will issue things like `tcd` to change directory
22-- 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+
37vim .opt .rtp = {
4- vim . fn . fnamemodify ( vim . trim ( vim . fn . system ( " git rev-parse --show-toplevel " )), " :p " ) ,
8+ root_dir ,
59 vim .env .VIMRUNTIME ,
610}
711
Original file line number Diff line number Diff line change 11-- Need the absolute path as when doing the testing we will issue things like `tcd` to change directory
22-- 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+
37vim .opt .rtp = {
4- vim . fn . fnamemodify ( vim . trim ( vim . fn . system ( " git rev-parse --show-toplevel " )), " :p " ) ,
8+ root_dir ,
59 vim .env .VIMRUNTIME ,
610}
711
You can’t perform that action at this time.
0 commit comments