File tree Expand file tree Collapse file tree 3 files changed +42
-2
lines changed Expand file tree Collapse file tree 3 files changed +42
-2
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Test
2+ on :
3+ push :
4+ branches : [ main ]
5+ pull_request :
6+ branches : [ main ]
7+ jobs :
8+ build :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v3
12+ - name : Set up Python
13+ uses : actions/setup-python@v4
14+ with :
15+ python-version : ' 3.12'
16+ - name : Set up Node.js
17+ uses : actions/setup-node@v3
18+ with :
19+ node-version : ' 18'
20+ - name : Install dependencies
21+ run : |
22+ python -m pip install --upgrade pip
23+ pip install build twine pytest pytest-cov setuptools setuptools-scm
24+ - name : Build and test
25+ run : |
26+ make ci
Original file line number Diff line number Diff line change @@ -4,7 +4,19 @@ LIBRARY_NAME="${LIBRARY_NAME:-tree-sitter-cedarscript}"
44TARGET_DIR=" target"
55GRAMMAR_DIR=" src/cedarscript_grammar"
66
7- ts () ( cd " $TARGET_DIR " && tree-sitter-macos-arm64 " $@ " ; )
7+ ts () (
8+ cd " $TARGET_DIR " || exit
9+ if [ -n " $GITHUB_ACTIONS " ] || [ " $( uname) " = " Linux" ]; then
10+ # On GitHub Actions or Linux, install and use tree-sitter from npm
11+ if ! command -v tree-sitter & > /dev/null; then
12+ npm install --global tree-sitter-cli
13+ fi
14+ tree-sitter " $@ "
15+ return
16+ fi
17+ # Local development on macOS ARM64
18+ tree-sitter-macos-arm64 " $@ "
19+ )
820
921playground () {
1022 while true ; do
You can’t perform that action at this time.
0 commit comments