@@ -123,6 +123,24 @@ jobs:
123123 run : |
124124 mvn process-sources -Dgenerate ${{ env.MVN_MULTI_THREADED_ARGS }}
125125
126+ - name : " Compile and Test"
127+ id : compile
128+ if : steps.spec_diff.outputs.spec_diff == 'true'
129+ description : |
130+ Compilation can easily fail e.g. from re-namings and has to be fixed manually.
131+ Thus this action raises the PR anyway and only reports success or failure of compilation and testing.
132+ run : |
133+ if mvn test-compile ${{ env.MVN_MULTI_THREADED_ARGS }} ; then
134+ echo "compilation_result=success" >> "$GITHUB_OUTPUT"
135+ if mvn test ${{ env.MVN_MULTI_THREADED_ARGS }} ; then
136+ echo "test_result=success" >> "$GITHUB_OUTPUT"
137+ else
138+ echo "test_result=failure" >> "$GITHUB_OUTPUT"
139+ fi
140+ else
141+ echo "compilation_result=failure" >> "$GITHUB_OUTPUT"
142+ fi
143+
126144 - name : " Push changes"
127145 id : push
128146 if : steps.spec_diff.outputs.spec_diff == 'true'
@@ -146,33 +164,17 @@ jobs:
146164 This PR was created automatically by the [spec-update workflow](https://github.com/SAP/ai-sdk-java/actions/workflows/spec-update.yaml).
147165 You can commit on top of this branch, but as long as this PR is open the action can't be re-run.
148166
167+ - Compilation outcome: ${{ steps.compile.output.test_result }}
168+ - Test run outcome: ${{ steps.compile.output.test_result }}
169+
149170 Before merging, make sure to update tests and release notes, if necessary.
150171
151172 ## Definition of Done
152173
153- - [ ] Spec update compiles
154174 - [ ] Unit tests cover new classes
155175 - [ ] Release notes updated
156176 "
157177
158- - name : " Compile and Test"
159- id : compile
160- if : steps.spec_diff.outputs.spec_diff == 'true'
161- description : |
162- Compilation can easily fail e.g. from re-namings and has to be fixed manually.
163- Thus this action raises the PR anyway and only reports success or failure of compilation and testing.
164- run : |
165- if mvn test-compile ${{ env.MVN_MULTI_THREADED_ARGS }} ; then
166- echo "compilation_result=success" >> "$GITHUB_OUTPUT"
167- if mvn test ${{ env.MVN_MULTI_THREADED_ARGS }} ; then
168- echo "test_result=success" >> "$GITHUB_OUTPUT"
169- else
170- echo "test_result=failure" >> "$GITHUB_OUTPUT"
171- fi
172- else
173- echo "compilation_result=failure" >> "$GITHUB_OUTPUT"
174- fi
175-
176178 - name : " Print Summary"
177179 if : ${{ always() }}
178180 run : |
0 commit comments