Skip to content

Commit 139de1e

Browse files
ci: clean up workflows
- Disable grammar generation step - Separate fuzz workflow from CI - Drop duplicate release workflow
1 parent 0055414 commit 139de1e

File tree

4 files changed

+36
-56
lines changed

4 files changed

+36
-56
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -17,54 +17,23 @@ jobs:
1717
steps:
1818
- name: Checkout repository
1919
uses: actions/checkout@v4
20-
2120
- name: Set up tree-sitter
22-
uses: tree-sitter/setup-action@v2
23-
with:
24-
install-lib: false
25-
21+
uses: tree-sitter/setup-action/cli@v2
2622
- name: Set up Node.js
2723
uses: actions/setup-node@v4
2824
with:
2925
node-version: ${{vars.NODE_VERSION}}
30-
3126
- name: Build with all extensions
3227
run: node scripts/build.js
3328
env:
3429
ALL_EXTENSIONS: 1
35-
3630
- name: Run tests
3731
uses: tree-sitter/parser-test-action@v2
3832
with:
33+
generate: false
34+
test-rust: true
3935
test-parser-cmd: node scripts/test.js
40-
4136
- name: Rebuild with default extensions
4237
run: node scripts/build.js
4338
- name: Verify grammar consistency
4439
run: git diff --exit-code -- */src/grammar.json
45-
46-
fuzz:
47-
name: Fuzz parsers
48-
runs-on: ubuntu-latest
49-
strategy:
50-
fail-fast: false
51-
matrix:
52-
parser: [tree-sitter-markdown, tree-sitter-markdown-inline]
53-
steps:
54-
- name: Checkout repository
55-
uses: actions/checkout@v4
56-
with:
57-
fetch-depth: 2
58-
- name: Check for scanner changes
59-
id: scanner-changes
60-
run: |-
61-
if git diff --quiet HEAD^ -- '${{matrix.parser}}/src/scanner.c'; then
62-
printf 'changed=false\n' >> "$GITHUB_OUTPUT"
63-
else
64-
printf 'changed=true\n' >> "$GITHUB_OUTPUT"
65-
fi
66-
- name: Fuzz ${{matrix.parser}} parser
67-
uses: tree-sitter/fuzz-action@v4
68-
if: steps.scanner-changes.outputs.changed == 'true'
69-
with:
70-
directory: ${{matrix.parser}}

.github/workflows/fuzz.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Fuzz
2+
3+
on:
4+
push:
5+
branches: [split_parser]
6+
paths:
7+
- tree-sitter-markdown/src/scanner.c
8+
- tree-sitter-markdown-inline/src/scanner.c
9+
pull_request:
10+
paths:
11+
- tree-sitter-markdown/src/scanner.c
12+
- tree-sitter-markdown-inline/src/scanner.c
13+
workflow_dispatch:
14+
15+
jobs:
16+
fuzz:
17+
name: Fuzz parsers
18+
runs-on: ubuntu-latest
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
parser: [tree-sitter-markdown, tree-sitter-markdown-inline]
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v4
26+
- name: Fuzz ${{matrix.parser}} parser
27+
uses: tree-sitter/fuzz-action@v4
28+
with:
29+
directory: ${{matrix.parser}}

.github/workflows/publish.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish package
1+
name: Publish
22

33
on:
44
push:
@@ -7,9 +7,12 @@ on:
77
jobs:
88
github:
99
uses: tree-sitter/workflows/.github/workflows/release.yml@main
10+
with:
11+
attestations: true
1012
permissions:
1113
contents: write
1214
id-token: write
15+
attestations: write
1316
npm:
1417
uses: tree-sitter/workflows/.github/workflows/package-npm.yml@main
1518
with:

.github/workflows/release.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)