ci: run make test using xvfb #7
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: Tests | |
on: [push, pull_request, workflow_dispatch] | |
jobs: | |
tests: | |
name: unit tests | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Prepare | |
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" | |
} | |
love --version || { | |
sudo apt update -y | |
sudo add-apt-repository -y ppa:bartbes/love-stable | |
sudo apt update -y | |
sudo apt install -y love | |
} | |
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 | |
- name: Run tests | |
run: | | |
export PATH="${PWD}/_neovim/bin:${PATH}" | |
export VIM="${PWD}/_neovim/share/nvim/runtime" | |
nvim --version | |
love --version | |
which love | |
sudo xvfb-run -a -e make test |