Skip to content

Commit

Permalink
Add GitHub action configuration for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
calmyournerves committed Jul 5, 2024
1 parent 5557841 commit ec0454a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: tree-sitter

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 20
cache: 'npm'
- run: npm run dev-install
- run: npm test
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"main": "bindings/node",
"types": "bindings/node",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev-install": "npm install --no-save tree-sitter-cli",
"test": "tree-sitter generate && tree-sitter test",
"install": "node-gyp-build",
"prebuildify": "prebuildify --napi --strip"
},
Expand Down

0 comments on commit ec0454a

Please sign in to comment.