chore: upgrade tree-sitter #122
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- grammar.js | |
- src/** | |
- test/** | |
- bindings/** | |
- binding.gyp | |
pull_request: | |
paths: | |
- grammar.js | |
- src/** | |
- test/** | |
- bindings/** | |
- binding.gyp | |
concurrency: | |
group: ${{github.workflow}}-${{github.ref}} | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: Test parser | |
runs-on: ${{matrix.os}} | |
if: >- | |
!github.event.repository.is_template && | |
github.event.head_commit.message != 'Initial commit' | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-14] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up tree-sitter | |
uses: tree-sitter/setup-action/cli@v1 | |
- name: Check for scanner changes | |
id: scanner-check | |
shell: sh | |
run: |- | |
{ | |
test -f src/scanner.c && ! git diff --quiet HEAD^ -- "$_" && | |
printf 'changed=true\n' || printf 'changed=false\n' | |
} >> "$GITHUB_OUTPUT" | |
- name: Fuzz scanner | |
uses: tree-sitter/fuzz-action@v4 | |
if: steps.scanner-check.outputs.changed == 'true' | |
- name: Run tests | |
uses: tree-sitter/parser-test-action@v2 | |
with: | |
test-rust: ${{runner.os == 'Linux'}} | |
fuzz: | |
name: Fuzz scanner | |
runs-on: ubuntu-latest | |
if: >- | |
!github.event.repository.is_template && | |
github.event.head_commit.message != 'Initial commit' | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Check for scanner changes | |
id: scanner-check | |
shell: sh | |
run: |- | |
{ | |
test -f src/scanner.c && ! git diff --quiet HEAD^ -- "$_" && | |
printf 'changed=true\n' || printf 'changed=false\n' | |
} >> "$GITHUB_OUTPUT" | |
- name: Run fuzzer | |
uses: tree-sitter/fuzz-action@v4 | |
if: steps.scanner-check.outputs.changed == 'true' |