Added MC v.1.0.0 parser #3

Open
matth0930 wants to merge 12 commits from 2-add-mc-v1.0.0-parser into master
2 changed files with 80 additions and 0 deletions
Showing only changes of commit 0aa3ba0b33 - Show all commits

View File

@@ -0,0 +1,50 @@
name: Check Build
on:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Install tree-sitter CLI
run: npm install -g tree-sitter-cli
- name: Generate parser
run: tree-sitter generate
- name: Build parser (C library)
run: make
- name: Build parser (WASM)
run: tree-sitter build --wasm
- name: Build Node.js bindings
run: npm run install
- name: Verify parser generation
run: |
test -f src/parser.c || (echo "Parser not generated" && exit 1)
test -f src/node-types.json || (echo "Node types not generated" && exit 1)
- name: Verify C library build
run: |
test -f libtree-sitter-mc.a || (echo "Static library not built" && exit 1)
test -f libtree-sitter-mc.so || (echo "Shared library not built" && exit 1)
- name: Verify WASM build
run: |
test -f tree-sitter-mc.wasm || (echo "WASM file not built" && exit 1)

30
.gitea/workflows/test.yml Normal file
View File

@@ -0,0 +1,30 @@
name: Run Tests
on:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Install tree-sitter CLI
run: npm install -g tree-sitter-cli
- name: Generate parser
run: tree-sitter generate
- name: Run tests
run: tree-sitter test