fix ci
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
NeoVim tests / code-quality (push) Successful in 1m22s

This commit is contained in:
Jonathan Apodaca 2025-08-26 14:50:11 -06:00
parent 5dedfb991f
commit b7774781d2
3 changed files with 26 additions and 16 deletions

View File

@ -14,16 +14,16 @@ jobs:
- name: Populate Nix store - name: Populate Nix store
run: run:
nix-shell --run 'true' nix-shell --pure --run 'true'
- name: Type-check with lua-language-server - name: Type-check with lua-language-server
run: run:
nix-shell --run 'make lint' nix-shell --pure --run 'make lint'
- name: Check formatting with stylua - name: Check formatting with stylua
run: run:
nix-shell --run 'make fmt-check' nix-shell --pure --run 'make fmt-check'
- name: Run busted tests - name: Run busted tests
run: run:
nix-shell --run 'make test' nix-shell --pure --run 'make test'

10
.woodpecker/ci.yaml Normal file
View File

@ -0,0 +1,10 @@
when:
- event: push
steps:
- name: build
image: nixos/nix
commands:
- nix-shell --pure --run 'make lint'
- nix-shell --pure --run 'make fmt-check'
- nix-shell --pure --run 'make test'

View File

@ -292,19 +292,19 @@ describe('Range', function()
it('from_tsquery_caps with string array filter', function() it('from_tsquery_caps with string array filter', function()
withbuf({ withbuf({
'{', '{',
' "sample-key1": "sample-value1",', ' sample_key1 = "sample-value1",',
' "sample-key2": "sample-value2"', ' sample_key2 = "sample-value2",',
'}', '}',
}, function() }, function()
vim.cmd.setfiletype 'json' vim.cmd.setfiletype 'lua'
-- Place cursor in "sample-value1" -- Place cursor in "sample-value1"
Pos.new(0, 2, 25):save_to_pos '.' Pos.new(0, 2, 25):save_to_pos '.'
-- Query that captures both keys and values in pairs -- Query that captures both keys and values in pairs
local query = [[ local query = [[
(pair (field
key: _ @key name: _ @key
value: _ @value) value: _ @value)
]] ]]
@ -321,24 +321,24 @@ describe('Range', function()
assert.are.same(#ranges.value, 1) assert.are.same(#ranges.value, 1)
-- Check that we got sample-key1 and sample-value1 -- Check that we got sample-key1 and sample-value1
assert.are.same(ranges.key[1]:text(), '"sample-key1"') assert.are.same(ranges.key[1]:text(), 'sample_key1')
assert.are.same(ranges.value[1]:text(), '"sample-value1"') assert.are.same(ranges.value[1]:text(), '"sample-value1"')
end) end)
-- Make sure this works when the match is on the last line: -- Make sure this works when the match is on the last line:
withbuf({ withbuf({
'{"sample-key1": "sample-value1",', '{sample_key1= "sample-value1",',
'"sample-key2": "sample-value2"}', 'sample_key2= "sample-value2"}',
}, function() }, function()
vim.cmd.setfiletype 'json' vim.cmd.setfiletype 'lua'
-- Place cursor in "sample-value1" -- Place cursor in "sample-value1"
Pos.new(0, 2, 25):save_to_pos '.' Pos.new(0, 2, 25):save_to_pos '.'
-- Query that captures both keys and values in pairs -- Query that captures both keys and values in pairs
local query = [[ local query = [[
(pair (field
key: _ @key name: _ @key
value: _ @value) value: _ @value)
]] ]]
@ -355,7 +355,7 @@ describe('Range', function()
assert.are.same(#ranges.value, 1) assert.are.same(#ranges.value, 1)
-- Check that we got sample-key2 and sample-value2 -- Check that we got sample-key2 and sample-value2
assert.are.same(ranges.key[1]:text(), '"sample-key2"') assert.are.same(ranges.key[1]:text(), 'sample_key2')
assert.are.same(ranges.value[1]:text(), '"sample-value2"') assert.are.same(ranges.value[1]:text(), '"sample-value2"')
end) end)
end) end)