File tree Expand file tree Collapse file tree 3 files changed +53
-0
lines changed Expand file tree Collapse file tree 3 files changed +53
-0
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,13 @@ test-zig:
5858zig-version :
5959  description : Zig version 
6060  default : " 0.15.1" 
61+ 
62+ test-java :
63+   description : Test the Java bindings 
64+   default : " false" 
65+ java-version :
66+   description : Java version 
67+   default : " 22" 
6168` ` ` 
6269
6370## Example configuration 
Original file line number Diff line number Diff line change @@ -54,6 +54,12 @@ inputs:
5454  zig-version :
5555    description : Zig version 
5656    default : " 0.15.1" 
57+   test-java :
58+     description : Test the Java bindings 
59+     default : " false" 
60+   java-version :
61+     description : Java version 
62+     default : " 22" 
5763
5864runs :
5965  using : composite 
@@ -109,3 +115,8 @@ runs:
109115      if : inputs.test-zig == 'true' 
110116      with :
111117        zig-version : ${{inputs.zig-version}} 
118+     - name : Run Java tests 
119+       uses : tree-sitter/parser-test-action/java@v3 
120+       if : inputs.test-java == 'true' 
121+       with :
122+         java-version : ${{inputs.java-version}} 
Original file line number Diff line number Diff line change 1+ name : Tree-sitter parser test (Java) 
2+ description : Test a tree-sitter parser in Java 
3+ 
4+ inputs :
5+   java-version :
6+     description : Java version 
7+     default : " 22" 
8+   distribution :
9+     description : Java distribution 
10+     default : microsoft 
11+ 
12+ runs :
13+   using : composite 
14+   steps :
15+     - name : Set up Java 
16+       uses : actions/setup-java@v5 
17+       with :
18+         cache : maven 
19+         distribution : ${{inputs.distribution}} 
20+         java-version : ${{inputs.java-version}} 
21+         cache-dependency-path : pom.xml 
22+     - name : Set up tree-sitter library 
23+       uses : tree-sitter/setup-action/lib@v2 
24+     - name : Build parser library 
25+       shell : sh 
26+       run : |- 
27+         cmake -B build \ 
28+           -DBUILD_SHARED_LIBS=ON \ 
29+           -DCMAKE_INSTALL_LIBDIR=lib \ 
30+           -DCMAKE_INSTALL_BINDIR=lib \ 
31+           -DCMAKE_INSTALL_PREFIX="$RUNNER_TOOL_CACHE/tree-sitter/lib" 
32+         cmake --build build && cmake --install build --config Debug 
33+      - name : Run tests 
34+       shell : sh 
35+       run : mvn -B --no-transfer-progress test 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments