Skip to content

Commit db541b2

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

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

.github/workflows/default.yml

Lines changed: 11 additions & 4 deletions
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/ci@v0.3
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/ci@v0.3
1926
with:
20-
cacheFrom: ${{ env.IMAGE_NAME }}
27+
cacheFrom: ${{ env.IMAGE_NAME }}-${{ matrix.neovim-version }}
2128
push: never
2229
runCmd: make test

Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
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

2325
# Install dependencies needed for building devcontainers/cli and developing in neovim
@@ -33,6 +35,12 @@ RUN apt-get update && \
3335
luajit \
3436
luarocks \
3537
git \
38+
# Install NEOVIM
39+
&& curl -LO https://github.com/neovim/neovim/releases/download/v${NEOVIM_VERSION}/nvim-linux64.tar.gz \
40+
&& tar -xzf nvim-linux64.tar.gz \
41+
&& rm nvim-linux64.tar.gz \
42+
&& mv nvim-linux64 /opt/nvim \
43+
&& ln -s /opt/nvim/bin/nvim /usr/local/bin/nvim \
3644
# apt clean-up
3745
&& apt-get autoremove -y \
3846
&& rm -rf /var/lib/apt/lists/*

0 commit comments

Comments
 (0)