File tree Expand file tree Collapse file tree 2 files changed +22
-32
lines changed Expand file tree Collapse file tree 2 files changed +22
-32
lines changed Original file line number Diff line number Diff line change 1
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
2
+ # For more information see: https://docs .github.com/en/ actions/automating-builds- and-tests /building-and-testing-java-with-maven
3
3
4
4
name : Java CI with Maven
5
5
6
- on : [ push, pull_request ]
6
+ on :
7
+ push :
8
+ branches : [ main, master ]
9
+ pull_request :
10
+ branches : [ main, master ]
7
11
8
12
jobs :
9
13
build :
10
14
runs-on : ubuntu-latest
15
+ strategy :
16
+ fail-fast : false
17
+ matrix :
18
+ java : [ '8', '11' ]
11
19
12
20
steps :
13
- - uses : actions/checkout@v2
14
- - name : Set up JDK 8
15
- uses : actions/setup-java@v2
21
+ - uses : actions/checkout@v4
22
+ - name : Set up JDK ${{ matrix.java }}
23
+ uses : actions/setup-java@v4
16
24
with :
17
- java-version : ' 8 '
18
- distribution : ' adopt '
25
+ java-version : ${{ matrix.java }}
26
+ distribution : ' temurin '
19
27
cache : maven
20
28
- name : Build with Maven
21
- run : mvn --batch-mode --update-snapshots verify
29
+ run : mvn --batch-mode --update-snapshots verify
30
+
31
+ - name : Publish Test Results
32
+ if : always()
33
+ uses : EnricoMi/publish-unit-test-result-action@v2
34
+ with :
35
+ files : target/surefire-reports/*.xml
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments