Skip to content

Commit 052279c

Browse files
ci: update workflows
1 parent 07ba7b4 commit 052279c

File tree

5 files changed

+105
-107
lines changed

5 files changed

+105
-107
lines changed

.github/workflows/fuzz-dummy.yml

-15
This file was deleted.

.github/workflows/fuzz.yml

+2-16
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,17 @@
1-
# This is a basic workflow to help you get started with Actions
2-
31
name: Fuzz parser
42

5-
# Controls when the workflow will run
63
on:
7-
# Triggers the workflow on push or pull request events but only when changing the external-scanner
84
push:
95
paths:
106
- src/scanner.c
117
pull_request:
128
paths:
139
- src/scanner.c
1410

15-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1611
jobs:
17-
# This workflow contains a single job called "build"
1812
fuzz:
1913
name: Parser fuzzing
20-
# The type of runner that the job will run on
2114
runs-on: ubuntu-latest
22-
23-
# Steps represent a sequence of tasks that will be executed as part of the job
2415
steps:
25-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
26-
- uses: actions/checkout@v3
27-
- uses: vigoux/tree-sitter-fuzz-action@v1
28-
with:
29-
language: vim
30-
external-scanner: src/scanner.c
31-
time: 60
16+
- uses: actions/checkout@v4
17+
- uses: tree-sitter/fuzz-action@v4

.github/workflows/main.yml

+103-48
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,112 @@
1-
# This is a basic workflow to help you get started with Actions
1+
name: CI
22

3-
name: Main workflow
4-
5-
# Controls when the workflow will run
63
on:
7-
# Triggers the workflow on push or pull request events but only for the master branch
84
push:
9-
branches: [ master ]
5+
branches: [master]
6+
paths:
7+
- grammar.js
8+
- src/**
9+
- test/**
10+
- bindings/**
11+
- binding.gyp
1012
pull_request:
11-
branches: [ master ]
13+
paths:
14+
- grammar.js
15+
- src/**
16+
- test/**
17+
- bindings/**
18+
- binding.gyp
19+
20+
concurrency:
21+
group: ${{github.workflow}}-${{github.ref}}
22+
cancel-in-progress: true
1223

13-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1424
jobs:
15-
# This workflow contains a single job called "build"
16-
lint:
17-
name: Lint grammar
18-
runs-on: ubuntu-latest
19-
steps:
20-
- uses: actions/checkout@v3
21-
- uses: actions/setup-node@v3
22-
- name: Install Dependencies
23-
run: npm install
24-
- name: Run lint
25-
run: |
26-
npm run lint
2725
test:
28-
name: Tree-sitter tests
29-
runs-on: ubuntu-latest
30-
needs: lint
31-
# Steps represent a sequence of tasks that will be executed as part of the job
26+
name: Test parser
27+
runs-on: ${{matrix.os}}
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
os:
32+
- ubuntu-latest
33+
# windows-latest
34+
- macos-14
3235
steps:
33-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
34-
- uses: actions/checkout@v3
35-
- uses: actions/setup-node@v3
36-
- name: Install Dependencies
37-
run: npm install
38-
36+
- name: Set up repository
37+
uses: tree-sitter/[email protected]
38+
with:
39+
node-version: ${{vars.NODE_VERSION}}
40+
- name: Clone neovim runtime
41+
uses: actions/checkout@v4
42+
with:
43+
repository: neovim/neovim
44+
path: .tests/neovim
45+
sparse-checkout: runtime/
3946
- name: Run tests
40-
run: |
41-
npm run build
42-
npm run test
43-
parse-runtime:
44-
name: Parse runtime files
45-
runs-on: ubuntu-latest
46-
needs: lint
47-
steps:
48-
- uses: actions/checkout@v3
49-
- uses: actions/setup-node@v3
50-
- name: Install Dependencies
51-
run: |
52-
npm install
53-
- name: Download and parse runtime files
54-
env:
55-
NVIM_VERSION: "master"
56-
run: |
57-
./scripts/parse_runtime_files.sh
47+
uses: tree-sitter/[email protected]
48+
with:
49+
lint: true
50+
corpus-files: |-
51+
.tests/neovim/runtime/**/*.vim
52+
!.tests/neovim/runtime/autoload/ada.vim
53+
!.tests/neovim/runtime/autoload/adacomplete.vim
54+
!.tests/neovim/runtime/autoload/context.vim
55+
!.tests/neovim/runtime/autoload/decada.vim
56+
!.tests/neovim/runtime/autoload/gnat.vim
57+
!.tests/neovim/runtime/autoload/gzip.vim
58+
!.tests/neovim/runtime/autoload/javascriptcomplete.vim
59+
!.tests/neovim/runtime/autoload/msgpack.vim
60+
!.tests/neovim/runtime/autoload/netrw.vim
61+
!.tests/neovim/runtime/autoload/netrwSettings.vim
62+
!.tests/neovim/runtime/autoload/phpcomplete.vim
63+
!.tests/neovim/runtime/autoload/provider/clipboard.vim
64+
!.tests/neovim/runtime/autoload/provider/perl.vim
65+
!.tests/neovim/runtime/autoload/provider/python3.vim
66+
!.tests/neovim/runtime/autoload/provider/ruby.vim
67+
!.tests/neovim/runtime/autoload/python3complete.vim
68+
!.tests/neovim/runtime/autoload/shada.vim
69+
!.tests/neovim/runtime/autoload/spellfile.vim
70+
!.tests/neovim/runtime/autoload/tar.vim
71+
!.tests/neovim/runtime/autoload/tutor.vim
72+
!.tests/neovim/runtime/autoload/zip.vim
73+
!.tests/neovim/runtime/compiler/bdf.vim
74+
!.tests/neovim/runtime/compiler/mcs.vim
75+
!.tests/neovim/runtime/ftoff.vim
76+
!.tests/neovim/runtime/ftplugin/abaqus.vim
77+
!.tests/neovim/runtime/ftplugin/changelog.vim
78+
!.tests/neovim/runtime/ftplugin/debchangelog.vim
79+
!.tests/neovim/runtime/ftplugin/forth.vim
80+
!.tests/neovim/runtime/ftplugin/gdscript.vim
81+
!.tests/neovim/runtime/ftplugin/gpg.vim
82+
!.tests/neovim/runtime/ftplugin/markdown.vim
83+
!.tests/neovim/runtime/ftplugin/mermaid.vim
84+
!.tests/neovim/runtime/ftplugin/modconf.vim
85+
!.tests/neovim/runtime/ftplugin/muttrc.vim
86+
!.tests/neovim/runtime/ftplugin/python.vim
87+
!.tests/neovim/runtime/ftplugin/readline.vim
88+
!.tests/neovim/runtime/ftplugin/ruby.vim
89+
!.tests/neovim/runtime/ftplugin/rust.vim
90+
!.tests/neovim/runtime/ftplugin/sshconfig.vim
91+
!.tests/neovim/runtime/ftplugin/sudoers.vim
92+
!.tests/neovim/runtime/ftplugin/udevrules.vim
93+
!.tests/neovim/runtime/ftplugin/vhdl.vim
94+
!.tests/neovim/runtime/ftplugin/vim.vim
95+
!.tests/neovim/runtime/ftplugin/zig.vim
96+
!.tests/neovim/runtime/ftplugin.vim
97+
!.tests/neovim/runtime/ftplugof.vim
98+
!.tests/neovim/runtime/indent/ada.vim
99+
!.tests/neovim/runtime/indent/dylan.vim
100+
!.tests/neovim/runtime/indent/javascript.vim
101+
!.tests/neovim/runtime/indent/krl.vim
102+
!.tests/neovim/runtime/indent/php.vim
103+
!.tests/neovim/runtime/indent/rapid.vim
104+
!.tests/neovim/runtime/indent.vim
105+
!.tests/neovim/runtime/indoff.vim
106+
!.tests/neovim/runtime/keymap/*.vim
107+
!.tests/neovim/runtime/makemenu.vim
108+
!.tests/neovim/runtime/menu.vim
109+
!.tests/neovim/runtime/pack/dist/opt/swapmouse/plugin/swapmouse.vim
110+
!.tests/neovim/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
111+
!.tests/neovim/runtime/plugin/shada.vim
112+
!.tests/neovim/runtime/syntax/**/*.vim

scripts/parse_runtime_files.sh

-13
This file was deleted.

scripts/test.py

-15
This file was deleted.

0 commit comments

Comments
 (0)