@@ -173,6 +173,8 @@ jobs:
173173 runs-on : ubuntu-latest
174174 needs : [integration-tests]
175175 if : always() && github.repository == 'linode/linode_api4-python' # Run even if integration tests fail and only on main repository
176+ outputs :
177+ summary : ${{ steps.set-test-summary.outputs.summary }}
176178
177179 steps :
178180 - name : Checkout code
@@ -197,7 +199,6 @@ jobs:
197199 - name : Set release version env
198200 run : echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
199201
200-
201202 - name : Add variables and upload test results
202203 if : always()
203204 run : |
@@ -213,12 +214,24 @@ jobs:
213214 LINODE_CLI_OBJ_ACCESS_KEY : ${{ secrets.LINODE_CLI_OBJ_ACCESS_KEY }}
214215 LINODE_CLI_OBJ_SECRET_KEY : ${{ secrets.LINODE_CLI_OBJ_SECRET_KEY }}
215216
217+ - name : Generate test summary and save to output
218+ id : set-test-summary
219+ run : |
220+ filename=$(ls | grep -E '^[0-9]{12}_sdk_test_report\.xml$')
221+ test_output=$(python3 e2e_scripts/tod_scripts/generate_test_summary.py "${filename}")
222+ {
223+ echo 'summary<<EOF'
224+ echo "$test_output"
225+ echo EOF
226+ } >> "$GITHUB_OUTPUT"
227+
216228 notify-slack :
217229 runs-on : ubuntu-latest
218- needs : [integration-tests]
230+ needs : [integration-tests, process-upload-report ]
219231 if : ${{ (success() || failure()) }} # Run even if integration tests fail and only on main repository
220232 steps :
221233 - name : Notify Slack
234+ id : main_message
222235223236 with :
224237 method : chat.postMessage
@@ -229,7 +242,7 @@ jobs:
229242 - type: section
230243 text:
231244 type: mrkdwn
232- text: ":rocket: *${{ github.workflow }} Completed in: ${{ github.repository }}* :white_check_mark:"
245+ text: ":rocket: *${{ github.workflow }} Completed in: ${{ github.repository }}* ${{ needs.integration-tests.result == 'success' && ' :white_check_mark:' || ':failed:' }} "
233246 - type: divider
234247 - type: section
235248 fields:
@@ -247,4 +260,15 @@ jobs:
247260 - type: context
248261 elements:
249262 - type: mrkdwn
250- text: "Triggered by: :bust_in_silhouette: `${{ github.actor }}`"
263+ text: "Triggered by: :bust_in_silhouette: `${{ github.actor }}`"
264+
265+ - name : Test summary thread
266+ if : success()
267+ 268+ with :
269+ method : chat.postMessage
270+ token : ${{ secrets.SLACK_BOT_TOKEN }}
271+ payload : |
272+ channel: ${{ secrets.SLACK_CHANNEL_ID }}
273+ thread_ts: "${{ steps.main_message.outputs.ts }}"
274+ text: "${{ needs.process-upload-report.outputs.summary }}"
0 commit comments