Add tests setup #44
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: test | |
on: [pull_request, workflow_dispatch] | |
jobs: | |
lua: | |
strategy: | |
matrix: | |
version: [stable, nightly] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Neovim setup | |
uses: rhysd/action-setup-vim@v1 | |
with: | |
neovim: true | |
version: ${{ matrix.version }} | |
- name: Neovim version | |
run: nvim --version | |
- name: Bootstrap plenary | |
run: | | |
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 | |
git clone --depth 1 https://github.com/nvim-treesitter/nvim-treesitter ~/.local/share/nvim/site/pack/vendor/start/nvim-treesitter | |
git clone --depth 1 https://github.com/nvim-neotest/neotest.git ~/.local/share/nvim/site/pack/vendor/start/neotest | |
git clone --depth 1 https://github.com/nvim-neotest/nvim-nio.git ~/.local/share/nvim/site/pack/vendor/start/nvim-nio | |
ln -s $(pwd) ~/.local/share/nvim/site/pack/vendor/start | |
nvim --headless -c 'TSInstallSync lua go | quit' | |
- name: Install dependencies | |
run: ./test/install.sh | |
# - name: Run TSInstall | |
# run: nvim --headless -c 'TSInstallSync lua go | quit' | |
- name: Run tests | |
# run: nvim --headless -c 'lua require("test.minimal_init"); vim.cmd("PlenaryBustedDirectory test")' | |
# run: nvim --headless -c ':PlenaryBustedDirectory test' | |
run: nvim --headless -c "PlenaryBustedDirectory test {minimal_init = 'test/minimal.lua', sequential = true}" |