fix ci
This commit is contained in:
parent
5dedfb991f
commit
b7774781d2
8
.github/workflows/ci.yaml
vendored
8
.github/workflows/ci.yaml
vendored
@ -14,16 +14,16 @@ jobs:
|
||||
|
||||
- name: Populate Nix store
|
||||
run:
|
||||
nix-shell --run 'true'
|
||||
nix-shell --pure --run 'true'
|
||||
|
||||
- name: Type-check with lua-language-server
|
||||
run:
|
||||
nix-shell --run 'make lint'
|
||||
nix-shell --pure --run 'make lint'
|
||||
|
||||
- name: Check formatting with stylua
|
||||
run:
|
||||
nix-shell --run 'make fmt-check'
|
||||
nix-shell --pure --run 'make fmt-check'
|
||||
|
||||
- name: Run busted tests
|
||||
run:
|
||||
nix-shell --run 'make test'
|
||||
nix-shell --pure --run 'make test'
|
||||
|
10
.woodpecker/ci.yaml
Normal file
10
.woodpecker/ci.yaml
Normal 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'
|
@ -292,19 +292,19 @@ describe('Range', function()
|
||||
it('from_tsquery_caps with string array filter', function()
|
||||
withbuf({
|
||||
'{',
|
||||
' "sample-key1": "sample-value1",',
|
||||
' "sample-key2": "sample-value2"',
|
||||
' sample_key1 = "sample-value1",',
|
||||
' sample_key2 = "sample-value2",',
|
||||
'}',
|
||||
}, function()
|
||||
vim.cmd.setfiletype 'json'
|
||||
vim.cmd.setfiletype 'lua'
|
||||
|
||||
-- Place cursor in "sample-value1"
|
||||
Pos.new(0, 2, 25):save_to_pos '.'
|
||||
|
||||
-- Query that captures both keys and values in pairs
|
||||
local query = [[
|
||||
(pair
|
||||
key: _ @key
|
||||
(field
|
||||
name: _ @key
|
||||
value: _ @value)
|
||||
]]
|
||||
|
||||
@ -321,24 +321,24 @@ describe('Range', function()
|
||||
assert.are.same(#ranges.value, 1)
|
||||
|
||||
-- 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"')
|
||||
end)
|
||||
|
||||
-- Make sure this works when the match is on the last line:
|
||||
withbuf({
|
||||
'{"sample-key1": "sample-value1",',
|
||||
'"sample-key2": "sample-value2"}',
|
||||
'{sample_key1= "sample-value1",',
|
||||
'sample_key2= "sample-value2"}',
|
||||
}, function()
|
||||
vim.cmd.setfiletype 'json'
|
||||
vim.cmd.setfiletype 'lua'
|
||||
|
||||
-- Place cursor in "sample-value1"
|
||||
Pos.new(0, 2, 25):save_to_pos '.'
|
||||
|
||||
-- Query that captures both keys and values in pairs
|
||||
local query = [[
|
||||
(pair
|
||||
key: _ @key
|
||||
(field
|
||||
name: _ @key
|
||||
value: _ @value)
|
||||
]]
|
||||
|
||||
@ -355,7 +355,7 @@ describe('Range', function()
|
||||
assert.are.same(#ranges.value, 1)
|
||||
|
||||
-- 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"')
|
||||
end)
|
||||
end)
|
||||
|
Loading…
x
Reference in New Issue
Block a user