Skip to content

Commit 29a4c1c

Browse files
ci: use official actions
1 parent 5c4b295 commit 29a4c1c

File tree

2 files changed

+106
-11
lines changed

2 files changed

+106
-11
lines changed

.github/workflows/main.yml

+105-11
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,115 @@
1-
name: Run tree-sitter tests
1+
name: CI
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [master]
6+
paths:
7+
- grammar.js
8+
- src/**
9+
- test/**
10+
- bindings/**
11+
- binding.gyp
612
pull_request:
7-
branches: [ master ]
13+
branches: [master]
14+
paths:
15+
- grammar.js
16+
- src/**
17+
- test/**
18+
- bindings/**
19+
- binding.gyp
20+
21+
concurrency:
22+
group: ${{github.workflow}}-${{github.ref}}
23+
cancel-in-progress: true
824

925
jobs:
1026
test:
1127
name: Tree-sitter tests
12-
runs-on: ubuntu-latest
28+
runs-on: ${{matrix.os}}
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
os: [ubuntu-latest, windows-latest, macos-14]
1333
steps:
14-
- uses: actions/checkout@v4
15-
16-
- uses: actions/setup-node@v4
17-
- name: Install Dependencies
18-
run: npm install
19-
34+
- name: Set up repository
35+
uses: tree-sitter/parser-setup-action@v1.1
36+
with:
37+
node-version: 20
38+
- name: Clone nvim help files
39+
uses: actions/checkout@v4
40+
with:
41+
repository: neovim/neovim
42+
path: examples/neovim
43+
sparse-checkout: runtime/doc/
2044
- name: Run tests
21-
run: npm test
45+
uses: tree-sitter/parser-test-action@v1.2
46+
with:
47+
test-library: ${{runner.os == 'Linux'}}
48+
corpus-files: |-
49+
examples/neovim/runtime/doc/*
50+
# FIXME: these files should not have errors
51+
invalid-files: |-
52+
examples/neovim/runtime/doc/builtin.txt
53+
examples/neovim/runtime/doc/change.txt
54+
examples/neovim/runtime/doc/cmdline.txt
55+
examples/neovim/runtime/doc/dev_style.txt
56+
examples/neovim/runtime/doc/dev_tools.txt
57+
examples/neovim/runtime/doc/develop.txt
58+
examples/neovim/runtime/doc/diagnostic.txt
59+
examples/neovim/runtime/doc/editing.txt
60+
examples/neovim/runtime/doc/eval.txt
61+
examples/neovim/runtime/doc/faq.txt
62+
examples/neovim/runtime/doc/fold.txt
63+
examples/neovim/runtime/doc/ft_ada.txt
64+
examples/neovim/runtime/doc/ft_ps1.txt
65+
examples/neovim/runtime/doc/ft_sql.txt
66+
examples/neovim/runtime/doc/help.txt
67+
examples/neovim/runtime/doc/helphelp.txt
68+
examples/neovim/runtime/doc/if_perl.txt
69+
examples/neovim/runtime/doc/if_pyth.txt
70+
examples/neovim/runtime/doc/if_ruby.txt
71+
examples/neovim/runtime/doc/indent.txt
72+
examples/neovim/runtime/doc/index.txt
73+
examples/neovim/runtime/doc/intro.txt
74+
examples/neovim/runtime/doc/job_control.txt
75+
examples/neovim/runtime/doc/lsp.txt
76+
examples/neovim/runtime/doc/luaref.txt
77+
examples/neovim/runtime/doc/map.txt
78+
examples/neovim/runtime/doc/mbyte.txt
79+
examples/neovim/runtime/doc/motion.txt
80+
examples/neovim/runtime/doc/news.txt
81+
examples/neovim/runtime/doc/nvim.txt
82+
examples/neovim/runtime/doc/options.txt
83+
examples/neovim/runtime/doc/pattern.txt
84+
examples/neovim/runtime/doc/pi_gzip.txt
85+
examples/neovim/runtime/doc/pi_health.txt
86+
examples/neovim/runtime/doc/pi_msgpack.txt
87+
examples/neovim/runtime/doc/pi_netrw.txt
88+
examples/neovim/runtime/doc/pi_paren.txt
89+
examples/neovim/runtime/doc/pi_tar.txt
90+
examples/neovim/runtime/doc/pi_tutor.txt
91+
examples/neovim/runtime/doc/pi_zip.txt
92+
examples/neovim/runtime/doc/provider.txt
93+
examples/neovim/runtime/doc/quickfix.txt
94+
examples/neovim/runtime/doc/quickref.txt
95+
examples/neovim/runtime/doc/remote_plugin.txt
96+
examples/neovim/runtime/doc/repeat.txt
97+
examples/neovim/runtime/doc/russian.txt
98+
examples/neovim/runtime/doc/starting.txt
99+
examples/neovim/runtime/doc/syntax.txt
100+
examples/neovim/runtime/doc/tabpage.txt
101+
examples/neovim/runtime/doc/tips.txt
102+
examples/neovim/runtime/doc/ui.txt
103+
examples/neovim/runtime/doc/usr_02.txt
104+
examples/neovim/runtime/doc/usr_03.txt
105+
examples/neovim/runtime/doc/usr_07.txt
106+
examples/neovim/runtime/doc/usr_11.txt
107+
examples/neovim/runtime/doc/usr_12.txt
108+
examples/neovim/runtime/doc/usr_22.txt
109+
examples/neovim/runtime/doc/usr_28.txt
110+
examples/neovim/runtime/doc/usr_29.txt
111+
examples/neovim/runtime/doc/usr_41.txt
112+
examples/neovim/runtime/doc/various.txt
113+
examples/neovim/runtime/doc/vim_diff.txt
114+
examples/neovim/runtime/doc/visual.txt
115+
examples/neovim/runtime/doc/windows.txt

Package.swift

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)