File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Build Java Semantic Kernel
2-
2+
33# Triggers the workflow on manual dispatch, push, and pull request events
44# for the specified branches and paths
55on :
1212 branches : [ "main", "java-development" ]
1313 paths :
1414 - ' java/**'
15-
15+
1616permissions :
1717 contents : read
18-
18+
1919jobs :
2020 # Determines if Java files have changed
2121 paths-filter :
3737 - name : not java tests
3838 if : steps.filter.outputs.java != 'true'
3939 run : echo "NOT java file"
40-
40+
4141 # Builds and tests the Java project
4242 java-build :
4343 runs-on : ubuntu-latest
@@ -48,31 +48,31 @@ jobs:
4848 matrix :
4949 # Defines a matrix strategy for JDK versions 11 and 17
5050 java-versions : [11, 17]
51-
51+
5252 name : Java CI on JDK${{ matrix.java-versions }}
53-
53+
5454 steps :
5555 - name : Checkout
5656 uses : actions/checkout@v3
57-
57+
5858 # Sets up the specified JDK version from the matrix
5959 - name : Set up JDK ${{ matrix.java-versions }}
6060 uses : actions/setup-java@v3
6161 with :
6262 java-version : ${{ matrix.java-versions }}
6363 distribution : microsoft
6464 cache : maven
65-
65+
6666 # Builds the project with Maven using the matrix JDK version
6767 - name : Build with Maven
6868 run : ./mvnw -B -Pbug-check -DskipTests -Pcompile-jdk${{ matrix.java-versions }} clean install --file pom.xml
6969 working-directory : java
70-
70+
7171 # Runs tests with Maven using the matrix JDK version
7272 - name : Run tests
7373 run : ./mvnw -B -Pbug-check -Pcompile-jdk${{ matrix.java-versions }} test --file pom.xml
7474 working-directory : java
75-
75+
7676 # Uploads test artifacts for each JDK version
7777 - uses : actions/upload-artifact@v2
7878 if : always()
You can’t perform that action at this time.
0 commit comments