Skip to content

Commit

Permalink
Use tree-sitter actions
Browse files Browse the repository at this point in the history
  • Loading branch information
eed3si9n committed Sep 11, 2024
1 parent 988135a commit 6b819dc
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,25 @@ jobs:
with:
node-version: 20

- name: Set up tree-sitter
uses: tree-sitter/setup-action/cli@v1

- name: Generate parser from scratch and test it
if: ${{ runner.os == 'Linux' || needs.changedfiles.outputs.c }}
shell: bash
run: |
npm install
export PATH=./node_modules/.bin:$PATH
tree-sitter generate
tree-sitter test
tree-sitter parse examples/*.scala --quiet --time
npm test
run: tree-sitter generate

- name: Run parser and binding tests
uses: tree-sitter/parser-test-action@v2
with:
test-rust: ${{runner.os == 'Linux'}}
test-swift: ${{runner.os == 'macOS'}}

- name: Parse sample files
uses: tree-sitter/parse-action@v4
id: parse-files
with:
files: examples/**

- name: Check fidelity of checked-in C code
if: ${{ runner.os == 'Linux' && needs.changedfiles.outputs.gen }}
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ jobs:
with:
fetch-depth: 10

- name: Set up tree-sitter
uses: tree-sitter/setup-action/cli@v1

- name: Generate parser from scratch
run: |
npm install
export PATH=./node_modules/.bin:$PATH
tree-sitter generate
shell: bash
run: tree-sitter generate

- name: Format Javascipt
run: |
Expand Down

0 comments on commit 6b819dc

Please sign in to comment.