File tree 1 file changed +38
-0
lines changed
1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ # This workflow will build a Java project with Maven
2
+ # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
3
+
4
+ name : Build
5
+ on :
6
+ push :
7
+ branches : [ main, 3.1.x ]
8
+ pull_request :
9
+ branches : [ main, 3.1.x ]
10
+ jobs :
11
+ build :
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - uses : actions/checkout@v2
15
+ - name : Set up JDK
16
+ uses : actions/setup-java@v2
17
+ with :
18
+ distribution : ' temurin'
19
+ java-version : ' 17'
20
+ - name : Cache local Maven repository
21
+ uses : actions/cache@v2
22
+ with :
23
+ path : ~/.m2/repository
24
+ key : ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
25
+ restore-keys : |
26
+ ${{ runner.os }}-maven-
27
+ - name : Build with Maven
28
+ run : ./mvnw -s .settings.xml clean org.jacoco:jacoco-maven-plugin:prepare-agent install -U -P sonar -nsu --batch-mode -Dmaven.test.redirectTestOutputToFile=true -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
29
+ - name : Publish Test Report
30
+ uses : mikepenz/action-junit-report@v2
31
+ if : always() # always run even if the previous step fails
32
+ with :
33
+ report_paths : ' **/surefire-reports/TEST-*.xml'
34
+ - name : Archive code coverage results
35
+ uses : actions/upload-artifact@v2
36
+ with :
37
+ name : surefire-reports
38
+ path : ' **/surefire-reports/*'
You can’t perform that action at this time.
0 commit comments