feat: ensure tags have the same starting and ending names #70
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: Test grammar | |
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" | |
jobs: | |
test: | |
name: Test parsers | |
runs-on: ${{matrix.os}} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-14] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up NodeJS | |
uses: actions/setup-node@v4 | |
with: | |
cache: npm | |
node-version: ${{vars.NODE_VERSION}} | |
- name: Set up Rust | |
uses: actions-rust-lang/[email protected] | |
if: runner.os == 'macOS' | |
- name: Install dependencies | |
shell: sh | |
run: npm ci | |
- name: Add tree-sitter executable to PATH | |
shell: sh | |
run: echo "$PWD/node_modules/.bin" >> "$GITHUB_PATH" | |
- 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-grammars/actions/test@main | |
with: | |
test-library: ${{runner.os == 'Linux'}} | |
examples: |- | |
examples/lemminx/org.eclipse.lemminx/src/test/resources/catalogs/** | |
examples/lemminx/org.eclipse.lemminx/src/test/resources/dtd/** | |
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/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 | |
- 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-grammars/tree-sitter-fuzz-action@v3 | |
if: steps.scanner.changes.outputs.any_changed == 'true' | |
with: | |
directory: ${{matrix.language}} |