CI: Build neovim in separate stage

This commit is contained in:
Lewis Russell 2020-12-02 23:08:28 +00:00
parent 284548d934
commit 0ed5a4059e
2 changed files with 13 additions and 7 deletions

View File

@ -2,7 +2,7 @@
name: CI
# Controls when the action will run.
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
@ -51,5 +51,8 @@ jobs:
pkg-config \
unzip
- name: Run test
- name: Build Neovim
run: make neovim
- name: Run Test
run: make test

View File

@ -10,13 +10,16 @@ BUSTED_ARGS = \
TEST_FILE = $(PJ_ROOT)/test/gitsigns_spec.lua
neovim:
git clone --depth 1 https://github.com/neovim/neovim
make -C $@
plenary.nvim:
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim
.PHONY: test
test:
test: neovim plenary.nvim
@git reset test/dummy.txt > /dev/null
@[ -d plenary.nvim ] || \
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim
@[ -d neovim ] || \
git clone --depth 1 https://github.com/neovim/neovim
make -C neovim functionaltest \
BUSTED_ARGS="$(BUSTED_ARGS)" \
TEST_FILE="$(TEST_FILE)"