File tree Expand file tree Collapse file tree 1 file changed +28
-5
lines changed
Expand file tree Collapse file tree 1 file changed +28
-5
lines changed Original file line number Diff line number Diff line change @@ -45,12 +45,10 @@ jobs:
4545 # Output the versions as a string that can be used in the matrix
4646 echo "VERSIONS=${json_versions}" >> $GITHUB_OUTPUT
4747
48- test-dependency-versions :
49- needs : fetch-dependency-versions
48+ setup-environment :
5049 runs-on : ubuntu-latest
51- strategy :
52- matrix :
53- version : ${{ fromJson(needs.fetch-dependency-versions.outputs.versions) }}
50+ outputs :
51+ cache-key : ${{ steps.cache-build.outputs.cache-hit }}
5452 steps :
5553 - name : " Checkout repository"
5654 uses : actions/checkout@v4
6765 MVN_ARGS="${{ env.MVN_MULTI_THREADED_ARGS }} clean install -DskipTests -DskipFormatting"
6866 mvn $MVN_ARGS
6967
68+ - name : " Cache build"
69+ id : cache-build
70+ uses : actions/cache@v3
71+ with :
72+ path : ~/.m2/repository
73+ key : ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
74+ restore-keys : ${{ runner.os }}-maven-
75+
76+ test-dependency-versions :
77+ needs : [ fetch-dependency-versions, setup-environment ]
78+ runs-on : ubuntu-latest
79+ strategy :
80+ fail-fast : false
81+ matrix :
82+ version : ${{ fromJson(needs.fetch-dependency-versions.outputs.versions) }}
83+ steps :
84+ - name : " Checkout repository"
85+ uses : actions/checkout@v4
86+
87+ - name : " Restore build cache"
88+ uses : actions/cache@v3
89+ with :
90+ path : ~/.m2/repository
91+ key : ${{ needs.setup-environment.outputs.cache-key }}
92+
7093 - name : " Run tests with explicit version"
7194 run : |
7295 MVN_ARGS="${{ env.MVN_MULTI_THREADED_ARGS }} clean package spring-boot:run -pl :spring-app -Dcloud-sdk.version=${{ matrix.version }} -Denforcer.skip=true"
You can’t perform that action at this time.
0 commit comments