Skip to content

Commit bb5803a

Browse files
committed
clean-up
1 parent b1b516a commit bb5803a

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/continuous-integration.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ env:
3838
SDK_M2_PATH: |
3939
~/.m2/repository/com/sap/cloud/sdk/**
4040
~/.m2/repository/archetype-catalog.xml
41+
SDK_TARGETS_NAME: "sdk-targets" # used for the SDK's target directories
42+
SDK_TARGETS_PATH: |
43+
./**/target/**
4144
4245
# keep the following two variables in sync with our 'cache-maven-dependencies.yaml' workflow
4346
MAVEN_CACHE_KEY: maven-dependencies
@@ -146,6 +149,13 @@ jobs:
146149
path: ${{ env.SDK_M2_PATH }}
147150
retention-days: 1
148151

152+
- name: "Upload SDK Targets"
153+
uses: actions/upload-artifact@v4
154+
with:
155+
name: ${{ env.SDK_TARGETS_NAME }}
156+
path: ${{ env.SDK_TARGETS_PATH }}
157+
retention-days: 1
158+
149159
test:
150160
name: "Test"
151161
needs: [ context, build ]
@@ -175,6 +185,11 @@ jobs:
175185
name: ${{ env.SDK_M2_NAME }}
176186
path: ${{ env.M2_ROOT }}
177187

188+
- name: "Restore SDK Targets"
189+
uses: actions/download-artifact@v4
190+
with:
191+
name: ${{ env.SDK_TARGETS_NAME }}
192+
178193
- name: "Run Unit Tests"
179194
run: |
180195
MVN_ARGS="${{ env.MVN_SINGLE_THREADED_ARGS }} org.jacoco:jacoco-maven-plugin:prepare-agent surefire:test org.jacoco:jacoco-maven-plugin:report --fail-at-end"
@@ -218,12 +233,24 @@ jobs:
218233
distribution: "sapmachine"
219234
java-version: 17
220235

236+
- name: "Restore Dependencies"
237+
id: restore-dependencies
238+
uses: actions/cache/restore@v4
239+
with:
240+
key: ${{ env.MAVEN_CACHE_KEY }}
241+
path: ${{ env.M2_ROOT }}
242+
221243
- name: "Restore SDK M2"
222244
uses: actions/download-artifact@v4
223245
with:
224246
name: ${{ env.SDK_M2_NAME }}
225247
path: ${{ env.M2_ROOT }}
226248

249+
- name: "Restore SDK Targets"
250+
uses: actions/download-artifact@v4
251+
with:
252+
name: ${{ env.SDK_TARGETS_NAME }}
253+
227254
- name: "Run ${{ matrix.task.name }} Analysis"
228255
run: |
229256
MVN_ARGS="${{ env.MVN_MULTI_THREADED_ARGS }} ${{ env.MVN_SKIP_CI_PLUGINS }} ${{ matrix.task.mvn_goal }}"
@@ -247,6 +274,13 @@ jobs:
247274
distribution: "sapmachine"
248275
java-version: 17
249276

277+
- name: "Restore Dependencies"
278+
id: restore-dependencies
279+
uses: actions/cache/restore@v4
280+
with:
281+
key: ${{ env.MAVEN_CACHE_KEY }}
282+
path: ${{ env.MAVEN_CACHE_DIR }}
283+
250284
- name: "Initialize CodeQL"
251285
uses: github/codeql-action/init@v3
252286
with:

0 commit comments

Comments
 (0)