Skip to content

Commit 3b9caf8

Browse files
committed
Migrate CI to use nlua/busted
1 parent 4760520 commit 3b9caf8

6 files changed

Lines changed: 67 additions & 22 deletions

File tree

.busted

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
return {
2+
_all = {
3+
coverage = false,
4+
lpath = "lua/?.lua;lua/?/init.lua",
5+
lua = "~/.luarocks/bin/nlua",
6+
},
7+
default = {
8+
verbose = true
9+
},
10+
tests = {
11+
verbose = true
12+
},
13+
}

.github/workflows/tests.yml

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,32 +12,29 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
neovim_version: ['nightly', 'v0.9.5', 'v0.10.0']
15+
neovim_version: ['nightly', 'v0.10.0']
1616

1717
steps:
18-
- uses: actions/checkout@v2
19-
- run: date +%F > todays-date
20-
- name: Restore cache for today's nightly.
21-
uses: actions/cache@v2
18+
- uses: actions/checkout@v4
2219
with:
23-
path: _neovim
24-
key: ${{ runner.os }}-x64-${{ hashFiles('todays-date') }}
20+
ref: ${{ github.ref }}
2521

26-
- name: Prepare plenary
27-
run: |
28-
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim
29-
ln -s "$(pwd)" ~/.local/share/nvim/site/pack/vendor/start
30-
31-
- name: Prepare nvim-dap
32-
run: |
33-
git clone --depth 1 https://github.com/mfussenegger/nvim-dap ~/.local/share/nvim/site/pack/vendor/start/nvim-dap
34-
35-
- name: Setup neovim
22+
- name: Install neovim
3623
uses: rhysd/action-setup-vim@v1
3724
with:
3825
neovim: true
3926
version: ${{ matrix.neovim_version }}
4027

28+
- name: Install Lua
29+
uses: leso-kn/gh-actions-lua@master
30+
with:
31+
luaVersion: "5.1"
32+
33+
- name: Install Luarocks
34+
uses: hishamhm/gh-actions-luarocks@master
35+
with:
36+
luarocksVersion: "3.11.0"
37+
4138
- name: Run tests
4239
run: |
43-
nvim --headless --noplugin -u tests/minimal.vim -c "PlenaryBustedDirectory tests/ {minimal_init = 'tests/minimal.vim'}"
40+
luarocks test --local

nvim-dap-python-scm-1.rockspec

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
local _MODREV, _SPECREV = 'scm', '-1'
2+
rockspec_format = "3.0"
3+
package = 'nvim-dap-python'
4+
version = _MODREV .. _SPECREV
5+
6+
description = {
7+
summary = 'Python extension for nvim-dap',
8+
labels = {
9+
'neovim',
10+
'plugin',
11+
'debug-adapter-protocol',
12+
'debugger',
13+
'python',
14+
},
15+
homepage = 'https://github.com/mfussenegger/nvim-dap-python',
16+
license = 'GPL-3.0',
17+
}
18+
19+
dependencies = {
20+
'lua >= 5.1, < 5.4',
21+
'nvim-dap',
22+
}
23+
24+
test_dependencies = {
25+
"nlua",
26+
}
27+
28+
source = {
29+
url = 'git://github.com/mfussenegger/nvim-dap-python',
30+
}
31+
32+
build = {
33+
type = 'builtin',
34+
copy_directories = {
35+
'doc',
36+
'plugin',
37+
},
38+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe('dap with debugpy', function()
1515
end)
1616

1717
it('Can start session and break at breakpoint', function()
18-
local program = vim.fn.expand('%:p:h') .. '/tests/simple.py'
18+
local program = vim.fn.expand('%:p:h') .. '/spec/simple.py'
1919
local config = {
2020
type = 'python',
2121
request = 'launch',
File renamed without changes.

tests/minimal.vim

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)