Skip to content

Commit 6b819dc

Browse files
committed
Use tree-sitter actions
1 parent 988135a commit 6b819dc

File tree

2 files changed

+21
-11
lines changed

2 files changed

+21
-11
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,25 @@ jobs:
7272
with:
7373
node-version: 20
7474

75+
- name: Set up tree-sitter
76+
uses: tree-sitter/setup-action/cli@v1
77+
7578
- name: Generate parser from scratch and test it
7679
if: ${{ runner.os == 'Linux' || needs.changedfiles.outputs.c }}
7780
shell: bash
78-
run: |
79-
npm install
80-
export PATH=./node_modules/.bin:$PATH
81-
tree-sitter generate
82-
tree-sitter test
83-
tree-sitter parse examples/*.scala --quiet --time
84-
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/**
8594

8695
- name: Check fidelity of checked-in C code
8796
if: ${{ runner.os == 'Linux' && needs.changedfiles.outputs.gen }}

.github/workflows/sync.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@ jobs:
1717
with:
1818
fetch-depth: 10
1919

20+
- name: Set up tree-sitter
21+
uses: tree-sitter/setup-action/cli@v1
22+
2023
- name: Generate parser from scratch
21-
run: |
22-
npm install
23-
export PATH=./node_modules/.bin:$PATH
24-
tree-sitter generate
24+
shell: bash
25+
run: tree-sitter generate
2526

2627
- name: Format Javascipt
2728
run: |

0 commit comments

Comments
 (0)