mirror of
https://github.com/ivuorinen/tree-sitter-shellspec.git
synced 2026-01-26 11:43:59 +00:00
fix(ci): ensure parser is built before testing in GitHub workflows
- Add explicit parser build step before sample code testing - Remove --scope parameter that requires parser to be compiled first - Fix tree-sitter CLI v0.25.0 compatibility issue in CI environment The issue was that tree-sitter CLI v0.25.0 requires the parser to be compiled before it can recognize custom language scopes. This fix ensures the parser is always built before attempting to parse test files, resolving the 'Unknown scope' error in GitHub Actions.
This commit is contained in:
5
.github/workflows/test.yml
vendored
5
.github/workflows/test.yml
vendored
@@ -87,6 +87,9 @@ jobs:
|
||||
|
||||
- name: Test Parser with Sample Code
|
||||
run: |
|
||||
# Ensure parser is built
|
||||
npm run build
|
||||
|
||||
cat << 'EOF' > test_sample.shellspec
|
||||
#!/usr/bin/env shellspec
|
||||
|
||||
@@ -124,7 +127,7 @@ jobs:
|
||||
End
|
||||
EOF
|
||||
|
||||
npx tree-sitter parse --scope=source.shellspec test_sample.shellspec --quiet || {
|
||||
npx tree-sitter parse test_sample.shellspec --quiet || {
|
||||
echo "❌ Parser failed on sample ShellSpec code"
|
||||
exit 1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user