File tree Expand file tree Collapse file tree 1 file changed +29
-13
lines changed
Expand file tree Collapse file tree 1 file changed +29
-13
lines changed Original file line number Diff line number Diff line change 1818
1919jobs :
2020 build :
21- name : Maven test on Java ${{ matrix.Java }}
21+ name : Maven test on Java ${{ matrix.java }}
2222 runs-on : ubuntu-latest
2323 env :
2424 SEGMENT_DOWNLOAD_TIMEOUT_MINS : ' 15'
2525 strategy :
2626 matrix :
2727 java : ['20']
28- steps :
29- # - name: Workflow Telemetry
30- # uses: runforesight/workflow-telemetry-action@v1.8.7
31- - uses : actions/checkout@v3
32- - name : Set up JDK 20
33- uses : actions/setup-java@v3
34- with :
35- java-version : ${{ matrix.java }}
36- distribution : ' adopt'
37- cache : maven
38- - name : Maven Tests
39- run : mvn -B -X -e clean compile --file pom.xml --batch-mode --fail-fast
28+ steps :
29+ # Checkout the repository code
30+ - uses : actions/checkout@v3
31+
32+ # Set up JDK 20
33+ - name : Set up JDK 20
34+ uses : actions/setup-java@v3
35+ with :
36+ java-version : ${{ matrix.java }}
37+ distribution : ' temurin'
38+ cache : maven
39+
40+ # Cache Maven dependencies (adjust cache key to optimize)
41+ - name : Cache Maven dependencies
42+ uses : actions/cache@v3
43+ with :
44+ path : ~/.m2/repository
45+ key : ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} # Cache dependencies based on pom.xml changes
46+ restore-keys : |
47+ ${{ runner.os }}-maven-
48+
49+ # Build the project (compiles and packages the code)
50+ - name : Build the project
51+ run : mvn -B -X -e clean package --file pom.xml --batch-mode --fail-fast
52+
53+ # Run tests
54+ - name : Run tests
55+ run : mvn test -B -X -e --file pom.xml --batch-mode --fail-fast
You can’t perform that action at this time.
0 commit comments