Skip to content

File parsing action for tree-sitter parsers

License

Notifications You must be signed in to change notification settings

tree-sitter/parse-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tree-sitter parse files

Options

files:
  description: Glob patterns of files to be parsed
files-list:
  description: File with glob patterns of files to be parsed
invalid-files:
  description: Glob patterns of files that are invalid
invalid-files-list:
  description: File with glob patterns of files that are invalid

Note

You must supply at least one of files and files-list.

Example configuration

name: Parse examples

on:
  push:
    branches: [master]
    paths:
      - grammar.js
  pull_request:
    paths:
      - grammar.js

jobs:
  examples:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm install
      - uses: tree-sitter/parse-action@v3
        id: examples
        continue-on-error: true
        with:
          files: |-
            examples/**
      - uses: actions/upload-artifact@v4
        if: steps.examples.outputs.failures != ''
        with:
          name: failures
          path: ${{steps.examples.outputs.failures}}