Skip to content

Commit 695c036

Browse files
committed
chore: update ci workflows
1 parent fbbd7a4 commit 695c036

File tree

4 files changed

+32
-48
lines changed

4 files changed

+32
-48
lines changed

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,7 @@ indent_size = 4
1717
[*.snippets]
1818
indent_style = tab
1919
indent_size = 4
20+
21+
[*.yml]
22+
indent_size = 2
23+
indent_style = space

.github/workflows/ci.yml

Lines changed: 24 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,37 @@
11
name: Tests
22

3-
on: [push, pull_request]
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
- reopened
49

10+
workflow_dispatch:
511
jobs:
6-
x64-ubuntu:
7-
name: X64-ubuntu
8-
runs-on: ${{ matrix.os }}
12+
tests:
13+
runs-on: ubuntu-latest
14+
915
strategy:
10-
fail-fast: false
1116
matrix:
12-
include:
13-
- os: ubuntu-20.04
14-
url: https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz
15-
manager: sudo apt-get
16-
packages: -y fd-find
17+
neovim_version: ["stable", "v0.7.0"]
18+
1719
steps:
18-
- uses: actions/checkout@v2
19-
- run: date +%F > todays-date
20-
- name: Restore from todays cache
21-
uses: actions/cache@v2
20+
- name: Checkout
21+
uses: actions/checkout@v6
22+
23+
- name: Setup neovim
24+
uses: rhysd/action-setup-vim@v1
2225
with:
23-
path: _neovim
24-
key: ${{ runner.os }}-${{ matrix.url }}-${{ hashFiles('todays-date') }}
25-
- name: Prepare
26+
neovim: true
27+
version: ${{ matrix.neovim_version }}
28+
29+
- name: Install Dependence
2630
run: |
27-
${{ matrix.manager }} update
28-
${{ matrix.manager }} install ${{ matrix.packages }}
29-
test -d _neovim || {
30-
mkdir -p _neovim
31-
curl -sL ${{ matrix.url }} | tar xzf - --strip-components=1 -C "${PWD}/_neovim"
32-
}
3331
mkdir -p ~/.local/share/nvim/site/pack/vendor/start
34-
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim
35-
git clone --depth 1 https://github.com/nvim-treesitter/nvim-treesitter ~/.local/share/nvim/site/pack/vendor/start/nvim-treesitter
36-
git clone --depth 1 https://github.com/nvim-treesitter/playground ~/.local/share/nvim/site/pack/vendor/start/playground
37-
ln -s $(pwd) ~/.local/share/nvim/site/pack/vendor/start
32+
git clone --depth 1 --branch master https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim
33+
git clone --depth 1 --branch main https://github.com/nvim-treesitter/nvim-treesitter ~/.local/share/nvim/site/pack/vendor/start/nvim-treesitter
3834
- name: Run tests
3935
run: |
40-
export PATH="${PWD}/_neovim/bin:${PATH}"
41-
export VIM="${PWD}/_neovim/share/nvim/runtime"
42-
nvim --headless -u tests/minimal.vim -c "TSInstallSync all" -c "q"
36+
nvim --headless -u tests/minimal.vim -c "TSInstall lua javascript rust markdown markdown_inline" -c "q"
4337
make test
44-

tests/endwise_spec.lua

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
local npairs = require('nvim-autopairs')
2-
local ts = require('nvim-treesitter.configs')
32
local log = require('nvim-autopairs._log')
43

5-
ts.setup({
6-
ensure_installed = { 'lua' },
7-
highlight = { enable = true },
8-
})
94
_G.npairs = npairs
105
vim.api.nvim_set_keymap(
116
'i',

tests/treesitter_spec.lua

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
local npairs = require('nvim-autopairs')
2-
local ts = require('nvim-treesitter.configs')
3-
local log = require('nvim-autopairs._log')
42
local Rule = require('nvim-autopairs.rule')
53
local ts_conds = require('nvim-autopairs.ts-conds')
64

@@ -12,12 +10,6 @@ vim.api.nvim_set_keymap(
1210
{ expr = true, noremap = true }
1311
)
1412

15-
ts.setup({
16-
ensure_installed = { 'lua', 'javascript', 'rust', 'markdown', 'markdown_inline' },
17-
highlight = { enable = true },
18-
autopairs = { enable = true },
19-
})
20-
2113
local data = {
2214
{
2315
name = 'treesitter lua quote',
@@ -26,11 +18,11 @@ local data = {
2618
linenr = 5,
2719
key = [["]],
2820
before = {
29-
[[ [[ aaa| ]],
21+
[==[ [[ aaa| ]==],
3022
[[ ]],
3123
']]',
3224
},
33-
after = [[ [[ aaa"| ]],
25+
after = [==[ [[ aaa"| ]==],
3426
},
3527

3628
{
@@ -47,11 +39,11 @@ local data = {
4739
linenr = 5,
4840
key = [[%]],
4941
before = {
50-
[[ [[ abcde | ]],
42+
[==[ [[ abcde | ]==],
5143
[[ ]],
5244
']]',
5345
},
54-
after = [[ [[ abcde %|% ]],
46+
after = [==[ [[ abcde %|% ]==],
5547
},
5648
{
5749
name = 'ts_conds is_ts_node failed',

0 commit comments

Comments
 (0)