diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..24053f36 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,28 @@ +name: Test + +on: [push, pull_request] + +jobs: + lint: + name: PlenaryBustedDirectory + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + path: refactoring.nvim + - uses: actions/checkout@v2 + with: + repository: nvim-treesitter/nvim-treesitter + path: nvim-treesitter + - uses: actions/checkout@v2 + with: + repository: nvim-lua/plenary.nvim + path: plenary.nvim + - name: Setup + run: | + sudo apt-get update + sudo add-apt-repository ppa:neovim-ppa/unstable + sudo apt-get install neovim + - name: Test + run: + cd refactoring.nvim && make test diff --git a/lua/refactoring/tests/minimal.vim b/lua/refactoring/tests/minimal.vim index 3d0e8d5e..c0555129 100644 --- a/lua/refactoring/tests/minimal.vim +++ b/lua/refactoring/tests/minimal.vim @@ -27,12 +27,16 @@ set shiftwidth=4 runtime! plugin/plenary.vim lua < 0 then + -- fixes 'pos_delta >= 0' error - https://github.com/nvim-lua/plenary.nvim/issues/52 + vim.cmd('set display=lastline') + -- make "TSInstall*" available + vim.cmd 'runtime! plugin/nvim-treesitter.vim' + vim.cmd('TSInstallSync ' .. table.concat(to_install, ' ')) +end EOF