feat(ci): test support via plenary test harness #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: kulala tests | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: ~ | ||
tests: | ||
name: tests | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- os: ubuntu-22.04 | ||
rev: v0.10.0/nvim-linux64.tar.gz | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Restore cache. | ||
uses: actions/cache@v4 | ||
with: | ||
path: _neovim | ||
key: ${{ runner.os }}-${{ matrix.rev }} | ||
- name: Prepare dependencies | ||
run: | | ||
test -d _neovim || { | ||
mkdir -p _neovim | ||
curl -sL "https://github.com/neovim/neovim/releases/download/${{ matrix.rev }}" | tar xzf - --strip-components=1 -C "${PWD}/_neovim" | ||
} | ||
mkdir -p ~/.local/share/nvim/site/pack/vendor/start | ||
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim | ||
ln -s $(pwd) ~/.local/share/nvim/site/pack/vendor/start | ||
export PATH="${PWD}/_neovim/bin:${PATH}" | ||
export VIM="${PWD}/_neovim/share/nvim/runtime" | ||
nvim --headless -c 'TSInstallSync lua | quit' | ||
- name: Run tests | ||
run: | | ||
export PATH="${PWD}/_neovim/bin:${PATH}" | ||
export VIM="${PWD}/_neovim/share/nvim/runtime" | ||
nvim --version | ||
/bin/bash ./scripts/test |