feat: update to tree-sitter 0.24 #38
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: [split_parser] | |
paths: | |
- "scripts/*" | |
- "common/*" | |
- "*/grammar.js" | |
- "*/src/**" | |
- "*/test/**" | |
- "*/bindings/**" | |
- "bindings/**" | |
- "binding.gyp" | |
- "setup.py" | |
pull_request: | |
paths: | |
- "scripts/*" | |
- "common/*" | |
- "*/grammar.js" | |
- "*/src/**" | |
- "*/test/**" | |
- "*/bindings/**" | |
- "bindings/**" | |
- "binding.gyp" | |
- "setup.py" | |
jobs: | |
test: | |
name: Test parsers | |
runs-on: ${{matrix.os}} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-14] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install tree-sitter CLI | |
uses: tree-sitter/setup-action/cli@v1 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{vars.NODE_VERSION}} | |
- name: Build with all extensions | |
run: node scripts/build.js | |
env: | |
ALL_EXTENSIONS: 1 | |
- name: Run tests | |
uses: tree-sitter/parser-test-action@v2 | |
with: | |
test-rust: true | |
test-parser-cmd: node scripts/test.js | |
- name: Rebuild with default extensions | |
run: node scripts/build.js | |
- name: Verify grammar consistency | |
run: git diff --exit-code -- */src/grammar.json | |
fuzz: | |
name: Fuzz parsers | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
parser: [tree-sitter-markdown, tree-sitter-markdown-inline] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Check for scanner changes | |
id: scanner-changes | |
run: |- | |
if git diff --quiet HEAD^ -- '${{matrix.parser}}/src/scanner.c'; then | |
printf 'changed=false\n' >> "$GITHUB_OUTPUT" | |
else | |
printf 'changed=true\n' >> "$GITHUB_OUTPUT" | |
fi | |
- name: Fuzz ${{matrix.parser}} parser | |
uses: tree-sitter/fuzz-action@v4 | |
if: steps.scanner-changes.outputs.changed == 'true' | |
with: | |
directory: ${{matrix.parser}} |