Skip to content

Commit 614df60

Browse files
committed
ci: add standard workflows
1 parent 03ec5d7 commit 614df60

File tree

6 files changed

+1315
-0
lines changed

6 files changed

+1315
-0
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Bug Report
2+
description: File a bug or issue
3+
title: "bug: "
4+
labels: [bug]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
**Before** reporting an issue, make sure to search [existing issues](https://github.com/tree-sitter/tree-sitter-julia/issues).
10+
If your issue is related to a bug in your editor-experience because your editor *leverages* tree-sitter and this parser, then it is likely your issue does *NOT* belong here and belongs in the relevant editor's repository.
11+
- type: checkboxes
12+
attributes:
13+
label: Did you check existing issues?
14+
description: Make sure you've checked all of the below before submitting an issue
15+
options:
16+
- label: I have read all the [tree-sitter docs](https://tree-sitter.github.io/tree-sitter/using-parsers) if it relates to using the parser
17+
required: false
18+
- label: I have searched the existing issues of tree-sitter-julia
19+
required: true
20+
- type: input
21+
attributes:
22+
label: "Tree-Sitter CLI Version, if relevant (output of `tree-sitter --version`)"
23+
placeholder: "tree-sitter 0.20.8 (6bbb50bef8249e6460e7d69e42cc8146622fa4fd)"
24+
validations:
25+
required: false
26+
- type: textarea
27+
attributes:
28+
label: Describe the bug
29+
description: A clear and concise description of what the bug is. Please include any related errors you see such as parsing errors or tree-sitter cli errors.
30+
validations:
31+
required: true
32+
- type: textarea
33+
attributes:
34+
label: Steps To Reproduce/Bad Parse Tree
35+
description: Steps to reproduce the behavior. If you have a bad parse tree, please include it here. You can get this by running `tree-sitter parse <path-to-file>` and copying the output.
36+
placeholder: |
37+
1.
38+
2.
39+
3.
40+
validations:
41+
required: true
42+
- type: textarea
43+
attributes:
44+
label: Expected Behavior/Parse Tree
45+
description: A concise description of what you expected to happen, or in the case of a bad parse tree, the expected parse tree.
46+
validations:
47+
required: true
48+
- type: textarea
49+
attributes:
50+
label: Repro
51+
description: Minimal code to reproduce this issue. Ideally this should be reproducible with the C library or the tree-sitter cli, do not suggest an editor or external tool.
52+
placeholder: |
53+
Example code that causes the issue
54+
render: PARSER_NAME
55+
validations:
56+
required: false

.github/workflows/ci.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
workflow_dispatch:
9+
10+
concurrency:
11+
group: ${{github.workflow}}-${{github.ref}}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
test:
16+
name: Test parser
17+
runs-on: ${{matrix.os}}
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
os: [ubuntu-latest, windows-latest, macos-latest]
22+
steps:
23+
- name: Set up repository
24+
uses: actions/checkout@v6
25+
26+
- name: Set up tree-sitter
27+
uses: tree-sitter/setup-action@v2
28+
with:
29+
install-lib: false
30+
31+
- name: Run tests
32+
uses: tree-sitter/parser-test-action@v2
33+
34+
query:
35+
name: Validate queries
36+
runs-on: ubuntu-latest
37+
steps:
38+
- name: Set up repository
39+
uses: actions/checkout@v6
40+
41+
- name: Set up tree-sitter
42+
uses: tree-sitter/setup-action/cli@v2
43+
44+
- name: Build parser
45+
run: tree-sitter build
46+
47+
- name: Set up ts_query_ls
48+
run: curl -fL https://github.com/ribru17/ts_query_ls/releases/latest/download/ts_query_ls-x86_64-unknown-linux-gnu.tar.gz | tar -xz
49+
50+
- name: Check queries
51+
run: ./ts_query_ls check -f queries/vue

.github/workflows/fuzz.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Fuzz Parser
2+
3+
on:
4+
push:
5+
branches: [master]
6+
paths:
7+
- src/scanner.c
8+
pull_request:
9+
paths:
10+
- src/scanner.c
11+
workflow_dispatch:
12+
13+
jobs:
14+
fuzz:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
- name: Run fuzzer
20+
uses: tree-sitter/fuzz-action@v4

.github/workflows/release.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Create release
2+
3+
on:
4+
push:
5+
tags: ["*"]
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: ${{github.workflow}}-${{github.ref}}
10+
cancel-in-progress: true
11+
12+
permissions:
13+
contents: write
14+
id-token: write
15+
attestations: write
16+
17+
jobs:
18+
release:
19+
uses: tree-sitter/workflows/.github/workflows/release.yml@main
20+
with:
21+
attestations: true
22+

.tsqueryrc.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/ribru17/ts_query_ls/refs/heads/master/schemas/config.json",
3+
"parser_install_directories": ["."]
4+
}

0 commit comments

Comments
 (0)