File tree 4 files changed +43
-22
lines changed
4 files changed +43
-22
lines changed Original file line number Diff line number Diff line change @@ -72,12 +72,25 @@ jobs:
72
72
with :
73
73
node-version : 20
74
74
75
+ - name : Set up tree-sitter
76
+ uses : tree-sitter/setup-action/cli@v1
77
+
75
78
- name : Generate parser from scratch and test it
76
79
if : ${{ runner.os == 'Linux' || needs.changedfiles.outputs.c }}
77
80
shell : bash
78
- run : |
79
- npm install
80
- npm test
81
+ run : tree-sitter generate
82
+
83
+ - name : Run parser and binding tests
84
+ uses : tree-sitter/parser-test-action@v2
85
+ with :
86
+ test-rust : ${{runner.os == 'Linux'}}
87
+ test-swift : ${{runner.os == 'macOS'}}
88
+
89
+ - name : Parse sample files
90
+ uses : tree-sitter/parse-action@v4
91
+ id : parse-files
92
+ with :
93
+ files : examples/**
81
94
82
95
- name : Check fidelity of checked-in C code
83
96
if : ${{ runner.os == 'Linux' && needs.changedfiles.outputs.gen }}
@@ -113,9 +126,10 @@ jobs:
113
126
files : |
114
127
queries/*.scm
115
128
116
- - name : Test quries if out of sync with nvim-treesitter
117
- if : steps.verify-changed-files.outputs.files_changed == 'true'
118
- run : |
119
- echo "::warning Queries in ${{ steps.verify-changed-files.outputs.changed_files }} in this repo are out of sync with nvim-treesitter"
120
- git diff queries/
121
- npm run test
129
+ # TODO: uncomment when this works
130
+ # - name: Test quries if out of sync with nvim-treesitter
131
+ # if: steps.verify-changed-files.outputs.files_changed == 'true'
132
+ # run: |
133
+ # echo "::warning Queries in ${{ steps.verify-changed-files.outputs.changed_files }} in this repo are out of sync with nvim-treesitter"
134
+ # git diff queries/
135
+ # npm run test
Original file line number Diff line number Diff line change @@ -17,15 +17,18 @@ jobs:
17
17
with :
18
18
fetch-depth : 10
19
19
20
+ - name : Set up tree-sitter
21
+ uses : tree-sitter/setup-action/cli@v1
22
+
20
23
- name : Generate parser from scratch
21
- run : |
22
- npm install
23
- npm run build
24
+ shell : bash
25
+ run : tree-sitter generate
24
26
25
27
- name : Format Javascipt
26
28
run : |
27
29
npm install
28
- npm run format
30
+ export PATH=./node_modules/.bin:$PATH
31
+ prettier --write --ignore-unknown grammar.js
29
32
30
33
- name : Check for changes
31
34
uses : tj-actions/verify-changed-files@v19
Original file line number Diff line number Diff line change 37
37
"install" : " node-gyp-build" ,
38
38
"prestart" : " tree-sitter build --wasm" ,
39
39
"start" : " tree-sitter playground" ,
40
- "build" : " tree-sitter generate && node-gyp build" ,
41
- "test" : " tree-sitter test && tree-sitter parse examples/*.scala --quiet --time && node --test bindings/node/*_test.js" ,
42
- "format" : " prettier --write --ignore-unknown grammar.js" ,
43
- "prebuildify" : " prebuildify --napi --strip"
40
+ "test" : " node --test bindings/node/*_test.js"
44
41
},
45
42
"tree-sitter" : [
46
43
{
You can’t perform that action at this time.
0 commit comments