build: update & regenerate parser #100
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: [master] | |
paths: | |
- "scripts.js" | |
- "common/*" | |
- "*/grammar.js" | |
- "*/src/**" | |
- "bindings/**" | |
- "binding.gyp" | |
pull_request: | |
paths: | |
- "scripts.js" | |
- "common/*" | |
- "*/grammar.js" | |
- "*/src/**" | |
- "bindings/**" | |
- "binding.gyp" | |
concurrency: | |
group: ${{github.workflow}}-${{github.ref}} | |
cancel-in-progress: true | |
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: Set up tree-sitter | |
uses: tree-sitter/setup-action/cli@v1 | |
- name: Clone examples | |
uses: actions/checkout@v4 | |
with: | |
path: examples/lemminx | |
repository: eclipse/lemminx | |
sparse-checkout: org.eclipse.lemminx/src/test/resources | |
ref: 6b12cd0a89205c2791ef1240e0d8401103f8c9a9 | |
- name: Run tests | |
uses: tree-sitter/parser-test-action@v2 | |
with: | |
test-rust: ${{runner.os == 'Linux'}} | |
- name: Parse examples | |
uses: tree-sitter/parse-action@v4 | |
continue-on-error: ${{runner.os == 'Windows'}} | |
with: | |
files: |- | |
examples/lemminx/org.eclipse.lemminx/src/test/resources/catalogs/ | |
examples/lemminx/org.eclipse.lemminx/src/test/resources/xml-model/ | |
examples/lemminx/org.eclipse.lemminx/src/test/resources/xml/ | |
examples/lemminx/org.eclipse.lemminx/src/test/resources/xsd/ | |
examples/lemminx/org.eclipse.lemminx/src/test/resources/dtd/ | |
!examples/lemminx/org.eclipse.lemminx/src/test/resources/xsd/empty.xsd | |
!examples/lemminx/org.eclipse.lemminx/src/test/resources/xml/largeFile.xml | |
!examples/lemminx/org.eclipse.lemminx/src/test/resources/xml/content.xml | |
invalid-files: |- | |
examples/lemminx/org.eclipse.lemminx/src/test/resources/xsd/foo-invalid-syntax.xsd | |
examples/lemminx/org.eclipse.lemminx/src/test/resources/xsd/foo-ns-invalid-syntax.xsd | |
examples/lemminx/org.eclipse.lemminx/src/test/resources/dtd/foo-invalid.dtd | |
fuzz: | |
name: Fuzz parsers | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
language: [xml, dtd] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Check for scanner changes | |
id: scanner-changes | |
uses: tj-actions/changed-files@v42 | |
with: | |
files: |- | |
common/scanner.h | |
${{matrix.language}}/src/scanner.c | |
- name: Fuzz ${{matrix.language}} parser | |
uses: tree-sitter/fuzz-action@v4 | |
if: steps.scanner-changes.outputs.any_changed == 'true' | |
with: | |
directory: ${{matrix.language}} |