Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tree-sitter/parse-action

File parsing action for tree-sitter parsers
https://github.com/tree-sitter/parse-action

actions tree-sitter

Last synced: 2 months ago
JSON representation

File parsing action for tree-sitter parsers

Awesome Lists containing this project

README

        

# Tree-sitter parse files

## Options

```yaml
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

```yaml
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}}
```