Skip to content

Commit ab29342

Browse files
committed
Create matrix for NEOVIM version
1 parent 57cd577 commit ab29342

File tree

4 files changed

+31
-12
lines changed

4 files changed

+31
-12
lines changed

.github/workflows/default.yml

+11-4
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,25 @@ env:
55
jobs:
66
unit-tests:
77
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
neovim-version: ["0.9.5", "0.10.0"]
11+
fail-fast: false
12+
name: NEOVIM ${{ matrix.neovim-version }}
813
steps:
914
- name: Checkout
1015
uses: actions/checkout@v3
11-
- name: Pre-build devcontainer image
16+
- name: Pre-build devcontainer image for NEOVIM ${{ matrix.neovim-version }}
1217
uses: devcontainers/[email protected]
1318
with:
14-
imageName: ${{ env.IMAGE_NAME }}
15-
cacheFrom: ${{ env.IMAGE_NAME }}
19+
imageName: ${{ env.IMAGE_NAME }}-${{ matrix.neovim-version }}
20+
cacheFrom: ${{ env.IMAGE_NAME }}-${{ matrix.neovim-version }}
1621
push: never
22+
buildArgs: |
23+
NEOVIM_VERSION=${{ matrix.neovim-version }}
1724
- name: Run tests inside the docker image
1825
uses: devcontainers/[email protected]
1926
with:
20-
cacheFrom: ${{ env.IMAGE_NAME }}
27+
cacheFrom: ${{ env.IMAGE_NAME }}-${{ matrix.neovim-version }}
2128
push: never
2229
runCmd: make test

Dockerfile

+9
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@
1818
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1919
# SOFTWARE.
2020

21+
ARG NEOVIM_VERSION=0.10.0
22+
2123
FROM ubuntu:22.04 as builder
2224

25+
ARG NEOVIM_VERSION
2326
# Install dependencies needed for building devcontainers/cli and developing in neovim
2427
RUN apt-get update && \
2528
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
@@ -33,6 +36,12 @@ RUN apt-get update && \
3336
luajit \
3437
luarocks \
3538
git \
39+
# Install NEOVIM
40+
&& curl -fLO https://github.com/neovim/neovim/releases/download/v${NEOVIM_VERSION}/nvim-linux64.tar.gz \
41+
&& tar -xzf nvim-linux64.tar.gz \
42+
&& rm nvim-linux64.tar.gz \
43+
&& mv nvim-linux64 /opt/nvim \
44+
&& ln -s /opt/nvim/bin/nvim /usr/local/bin/nvim \
3645
# apt clean-up
3746
&& apt-get autoremove -y \
3847
&& rm -rf /var/lib/apt/lists/*

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ make assumptions about how you work.
8080

8181
## Dependencies
8282

83+
- NeoVim 0.9.0+
8384
- [docker](https://docs.docker.com/get-docker/)
8485
- [devcontainer-cli](https://github.com/devcontainers/cli#npm-install)
8586
- [toggleterm](https://github.com/akinsho/toggleterm.nvim)
@@ -148,12 +149,12 @@ make assumptions about how you work.
148149
dotfiles_branch = "devcontainer-cli", -- branch to clone from dotfiles_repository`
149150
dotfiles_targetPath = "~/dotfiles", -- location to install dotfiles
150151
-- script to run after dotfiles are cloned
151-
dotfiles_intallCommand = "install.sh",
152+
dotfiles_intallCommand = "install.sh",
152153
shell = "bash", -- shell to use when executing commands
153154
-- The particular binary to use for connecting to in the devcontainer
154155
-- Most likely this should remain nvim
155156
nvim_binary = "nvim",
156-
-- Set the logging level for console (notifications) and file logging.
157+
-- Set the logging level for console (notifications) and file logging.
157158
-- The available levels are trace, debug, info, warn, error, or fatal.
158159
-- Set the log level for file logging
159160
log_level = "debug",

tests/minimal_init.lua

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
11
-- Copyright (c) 2024 Erich L Foster
2-
--
2+
--
33
-- Permission is hereby granted, free of charge, to any person obtaining a copy of
44
-- this software and associated documentation files (the "Software"), to deal in
55
-- the Software without restriction, including without limitation the rights to
66
-- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
77
-- of the Software, and to permit persons to whom the Software is furnished to do
88
-- so, subject to the following conditions:
9-
--
9+
--
1010
-- The above copyright notice and this permission notice shall be included in all
1111
-- copies or substantial portions of the Software.
12-
--
12+
--
1313
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1414
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1515
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1616
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1717
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1818
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1919
-- SOFTWARE.
20+
vim.opt.runtimepath:prepend(vim.fn.stdpath("data") .. "/site")
21+
vim.opt.packpath = vim.opt.runtimepath:get()
2022

23+
-- Your existing plenary setup
2124
local plenary_dir = os.getenv("PLENARY_DIR") or "/tmp/plenary.nvim"
22-
local is_not_a_directory = vim.fn.isdirectory(plenary_dir) == 0
23-
if is_not_a_directory then
24-
vim.fn.system({ "git", "clone", "https://github.com/nvim-lua/plenary.nvim", plenary_dir })
25+
if vim.fn.isdirectory(plenary_dir) == 0 then
26+
vim.fn.system({ "git", "clone", "--depth=1", "https://github.com/nvim-lua/plenary.nvim", plenary_dir })
2527
end
2628

2729
vim.opt.rtp:append(".")

0 commit comments

Comments
 (0)