Skip to content

Commit 47b4ce6

Browse files
committed
Add tree-sitter as a dependency in package-lock.json
1 parent a76b825 commit 47b4ce6

File tree

2 files changed

+100
-0
lines changed

2 files changed

+100
-0
lines changed

.github/workflows/ci_2.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: CI_2
2+
3+
on:
4+
push:
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+
24+
jobs:
25+
test:
26+
name: Test parser
27+
#runs-on: ${{matrix.os}}
28+
runs-on: ubuntu-latest
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
abi_version: [14, 15]
33+
# os: [ubuntu-latest, windows-latest, macos-14]
34+
env:
35+
TREE_SITTER_ABI_VERSION: ${{ matrix.abi_version }}
36+
steps:
37+
- name: Checkout repository
38+
uses: actions/checkout@v4
39+
- name: Set up tree-sitter
40+
uses: tree-sitter/setup-action/cli@v1
41+
- name: Install dependencies
42+
run: npm ci --omit dev --omit peer --omit optional
43+
# - name: Verify parser
44+
# run: git diff --exit-code -- src/parser.c
45+
# - name: Test parser
46+
# uses: tree-sitter/parser-test-action@v2
47+
# with:
48+
# test-parser: true
49+
- name: Test python binding
50+
uses: tree-sitter/parser-test-action@v2
51+
with:
52+
test-python: true
53+
- name: Test other binding
54+
uses: tree-sitter/parser-test-action@v2
55+
with:
56+
test-rust: true
57+
#test-node: true
58+
test-go: true
59+
test-swift: true
60+
61+
- name: Set up Node.js
62+
uses: actions/setup-node@v4
63+
with:
64+
cache: npm
65+
node-version: latest
66+
cache-dependency-path: package-lock.json
67+
- name: Build module
68+
shell: sh
69+
run: npm install
70+
- name: list module
71+
shell: sh
72+
run: npm list
73+
- name: Run tests
74+
shell: sh
75+
run: node --test bindings/node/*_test.js
76+
77+
- name: Generate parser
78+
run: |
79+
tree-sitter generate --abi=${{ matrix.abi_version }}
80+
[[ ! -d node_modules ]] || rm -rf node_modules
81+
# - name: Generate parser
82+
# if: ${{ matrix.abi_version != 15 }}
83+
# run: tree-sitter generate --abi=${{ matrix.abi_version }}
84+
# - name: Parse examples
85+
# uses: tree-sitter/parse-action@v4
86+
# with:
87+
# files: examples/*

package-lock.json

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)