From c5334da82f56fd38b0b7234b604d020f589328b4 Mon Sep 17 00:00:00 2001 From: Ismo Vuorinen Date: Sat, 13 Sep 2025 04:13:38 +0300 Subject: [PATCH] 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. --- .github/workflows/test.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f74806b..6dbd46e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 }