forked from slint-ui/slint
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (47 loc) · 1.96 KB
/
tree_sitter.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Copyright © SixtyFPS GmbH <info@slint.dev>
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
name: "Tree Sitter Test"
on:
# push:
# pull_request:
workflow_call:
inputs:
tag:
type: string
description: tree sitter release tag to use
latest:
type: boolean
description: Use the latest tree-sitter release
default: true
jobs:
tree-sitter-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: robinraju/release-downloader@v1.9
with:
repository: "tree-sitter/tree-sitter"
tag: ${{ inputs.tag }}
latest: ${{ inputs.latest }}
fileName: "tree-sitter-linux-x64.gz"
out-file-path: ${{ runner.workspace }}
- name: Extract tree-sitter-cli
run: |
gunzip tree-sitter-linux-x64.gz
chmod 755 tree-sitter-linux-x64
mv tree-sitter-linux-x64 tree-sitter
working-directory: ${{ runner.workspace }}
- name: Generate tree-sitter corpus
run: find ../../tests/cases -type d -exec ./test-to-corpus.py --tests-directory {} \;
working-directory: editors/tree-sitter-slint
- name: Generate tree-sitter parser
run: ${{ runner.workspace }}/tree-sitter generate
working-directory: editors/tree-sitter-slint
- name: Run tree-sitter tests
run: ${{ runner.workspace }}/tree-sitter test -u
working-directory: editors/tree-sitter-slint
- name: Check for parse ERRORs from tree-sitter
run: sh -c "! grep -q ERROR corpus/*.txt"
working-directory: editors/tree-sitter-slint