Skip to content

Commit 797afdd

Browse files
authored
test: add dockerfile as testing option (#417)
1 parent 6585cbe commit 797afdd

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM ubuntu:22.04
2+
3+
RUN apt update
4+
# install neovim dependencies
5+
RUN apt install -y git ninja-build gettext libtool libtool-bin autoconf \
6+
automake cmake g++ pkg-config unzip curl doxygen
7+
8+
# install neovim
9+
RUN git clone https://github.com/neovim/neovim
10+
RUN cd neovim && make CMAKE_BUILD_TYPE=RelWithDebInfo && make install
11+
12+
# install required plugins
13+
ARG PLUG_DIR="root/.local/share/nvim/site/pack/packer/start"
14+
RUN git clone https://github.com/nvim-lua/plenary.nvim $PLUG_DIR/plenary.nvim
15+
RUN git clone https://github.com/MunifTanjim/nui.nvim $PLUG_DIR/nui.nvim
16+
COPY . $PLUG_DIR/neo-tree.nvim
17+
18+
WORKDIR $PLUG_DIR/neo-tree.nvim

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ test:
55
nvim --headless --noplugin -u tests/mininit.lua -c "lua require('plenary.test_harness').test_directory('tests/neo-tree/', {minimal_init='tests/mininit.lua',sequential=true})"
66
@echo ""
77
@echo "TEST WITH follow_current_file = true"
8-
nvim --headless --noplugin -u tests/init_follow_current_file.lua -c"lua require('plenary.test_harness').test_directory('tests/neo-tree/', {minimal_init='tests/init_follow_current_file.lua',sequential=true})"
8+
nvim --headless --noplugin -u tests/init_follow_current_file.lua -c"lua require('plenary.test_harness').test_directory('tests/neo-tree/', {minimal_init='tests/init_follow_current_file.lua',sequential=true})"
9+
10+
.PHONY: test-docker
11+
test-docker:
12+
docker build -t neo-tree .
13+
docker run --rm neo-tree make test
914

1015
.PHONY: format
1116
format:

0 commit comments

Comments
 (0)