Skip to content

Commit

Permalink
Fix build, take 2
Browse files Browse the repository at this point in the history
**Problem**
npm build seems to overwrite `package.json`.

**Solution**
This moves the build and test code into GitHub Actions YAML.
  • Loading branch information
eed3si9n committed Sep 10, 2024
1 parent b02af60 commit 988135a
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 11 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ jobs:
shell: bash
run: |
npm install
export PATH=./node_modules/.bin:$PATH
tree-sitter generate
tree-sitter test
tree-sitter parse examples/*.scala --quiet --time
npm test
- name: Check fidelity of checked-in C code
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ jobs:
- name: Generate parser from scratch
run: |
npm install
npm run build
export PATH=./node_modules/.bin:$PATH
tree-sitter generate
- name: Format Javascipt
run: |
npm install
npm run format
export PATH=./node_modules/.bin:$PATH
prettier --write --ignore-unknown grammar.js
- name: Check for changes
uses: tj-actions/verify-changed-files@v19
Expand Down
17 changes: 12 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@
"install": "node-gyp-build",
"prestart": "tree-sitter build --wasm",
"start": "tree-sitter playground",
"build": "tree-sitter generate && node-gyp build",
"test": "tree-sitter test && tree-sitter parse examples/*.scala --quiet --time && node --test bindings/node/*_test.js",
"format": "prettier --write --ignore-unknown grammar.js",
"prebuildify": "prebuildify --napi --strip"
"test": "node --test bindings/node/*_test.js"
},
"tree-sitter": [
{
Expand Down

0 comments on commit 988135a

Please sign in to comment.