From 88d86dc1f6a63c07ac5371291447ecf6c7232549 Mon Sep 17 00:00:00 2001 From: Ade Attwood Date: Sun, 16 Jun 2024 16:42:38 +0100 Subject: [PATCH] ci: setup the new tests in github actions Summary: This runs the new tests in our existing CI. We will remove the old tests later when we know everything runs together so we know everything works. Test Plan: CI --- .github/workflows/ci.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf13a74..cd1ac05 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,10 +61,28 @@ jobs: uses: dtolnay/rust-toolchain@stable - name: Install dependencies - run: sudo apt update && sudo apt install -y luajit build-essential + run: sudo apt update && sudo apt install -y luajit build-essential luarocks + + - name: Install busted + run: sudo luarocks install busted + + - name: Install neovim + run: | + test -d _neovim || { + mkdir -p _neovim + curl -sL "https://github.com/neovim/neovim/releases/download/nightly/nvim-linux64.tar.gz" | tar xzf - --strip-components=1 -C "${PWD}/_neovim" + } - name: Build run: cargo build --release - name: Test run: find lua -name "*_test.lua" | xargs luajit scripts/test.lua + + - name: Run tests + run: | + export PATH="${PWD}/_neovim/bin:${PATH}" + export VIM="${PWD}/_neovim/share/nvim/runtime" + + nvim --version + nvim -l ./scripts/busted.lua ./lua