Skip to content

Commit 8e206d8

Browse files
committed
ci: update workflows
1 parent a210f66 commit 8e206d8

File tree

4 files changed

+72
-28
lines changed

4 files changed

+72
-28
lines changed

.github/workflows/ci.yml

+30-13
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,40 @@
11
name: CI
22

33
on:
4-
pull_request:
5-
branches:
6-
- "**"
74
push:
8-
branches:
9-
- "master"
5+
branches: [master]
6+
paths:
7+
- grammar.js
8+
- src/**
9+
- test/**
10+
- bindings/**
11+
- binding.gyp
12+
pull_request:
13+
paths:
14+
- grammar.js
15+
- src/**
16+
- test/**
17+
- bindings/**
18+
- binding.gyp
19+
20+
concurrency:
21+
group: ${{github.workflow}}-${{github.ref}}
22+
cancel-in-progress: true
23+
1024
jobs:
1125
test:
12-
runs-on: ${{ matrix.os }}
26+
name: Test parser
27+
runs-on: ${{matrix.os}}
1328
strategy:
14-
fail-fast: true
29+
fail-fast: false
1530
matrix:
16-
os: [macos-latest, ubuntu-latest, windows-latest]
31+
os: [ubuntu-latest, windows-latest, macos-14]
1732
steps:
18-
- uses: actions/checkout@v3
19-
- uses: actions/setup-node@v3
33+
- name: Checkout repository
34+
uses: actions/checkout@v4
35+
- name: Set up tree-sitter
36+
uses: tree-sitter/setup-action/cli@v1
37+
- name: Run tests
38+
uses: tree-sitter/parser-test-action@v2
2039
with:
21-
node-version: 18
22-
- run: npm install
23-
- run: npm test
40+
test-rust: ${{runner.os == 'Linux'}}

.github/workflows/fuzz.yml

+6-9
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,18 @@ name: Fuzz Parser
22

33
on:
44
push:
5+
branches: [master]
56
paths:
67
- src/scanner.c
78
pull_request:
89
paths:
910
- src/scanner.c
10-
workflow_dispatch:
1111

1212
jobs:
13-
test:
14-
name: Parser fuzzing
13+
fuzz:
1514
runs-on: ubuntu-latest
1615
steps:
17-
- uses: actions/checkout@v4
18-
- uses: vigoux/tree-sitter-fuzz-action@v1
19-
with:
20-
language: jsdoc
21-
external-scanner: src/scanner.c
22-
time: 60
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
- name: Run fuzzer
19+
uses: tree-sitter/fuzz-action@v4

.github/workflows/lint.yml

+13-6
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,25 @@ name: Lint
22

33
on:
44
push:
5-
branches:
6-
- master
5+
branches: [master]
6+
paths:
7+
- grammar.js
78
pull_request:
8-
branches:
9-
- "**"
9+
paths:
10+
- grammar.js
1011

1112
jobs:
1213
lint:
1314
runs-on: ubuntu-latest
1415
steps:
15-
- uses: actions/checkout@v3
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
- name: Set up Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
cache: npm
22+
node-version: ${{vars.NODE_VERSION}}
1623
- name: Install modules
17-
run: npm install
24+
run: npm ci --legacy-peer-deps
1825
- name: Run ESLint
1926
run: npm run lint

.github/workflows/publish.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Publish packages
2+
3+
on:
4+
push:
5+
tags: ["*"]
6+
7+
concurrency:
8+
group: ${{github.workflow}}-${{github.ref}}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
npm:
13+
uses: tree-sitter/workflows/.github/workflows/package-npm.yml@main
14+
secrets:
15+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
16+
crates:
17+
uses: tree-sitter/workflows/.github/workflows/package-crates.yml@main
18+
secrets:
19+
CARGO_REGISTRY_TOKEN: ${{secrets.CARGO_REGISTRY_TOKEN}}
20+
pypi:
21+
uses: tree-sitter/workflows/.github/workflows/package-pypi.yml@main
22+
secrets:
23+
PYPI_API_TOKEN: ${{secrets.PYPI_API_TOKEN}}

0 commit comments

Comments
 (0)