Skip to content

Updated tree-sitter version #43

Updated tree-sitter version

Updated tree-sitter version #43

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
types:
- opened
- synchronize
- reopened
- unlocked
jobs:
test-parsing:
concurrency:
group: ci-${{ github.event.pull_request.number }}
cancel-in-progress: true
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Setup tools
run: |
set -x
node -v
npm -v
gcc -v
npm ci
./node_modules/.bin/tree-sitter --version
- name: Generate the parser
run: npm run generate
- name: Check if auto-generated files are committed
run: |
git add .
if output="$(git status --porcelain=v2)"; then
files_changed_msg="$output"
diff="$(git diff --cached --color=never)"
if [ ${#diff} -gt 1000 ]; then
diff="${diff::1000}-- TRUNCATED --"
fi
echo "$diff"$'\n'
else
fail_code=$?
fi
if [ "${fail_code:-}" ]; then
exit $fail_code
elif [ "${files_changed_msg:-}" ]; then
>&2 echo \
"Detected changes after generating parser files:" \
$'\n'"$files_changed_msg"$'\n' \
$'\n'"Please commit those changes locally and push"
exit 1
fi
- name: Run the parsing tests
run: npm run test-parsing
- name: Run the query tests
run: npm run test-queries