@@ -133,25 +133,16 @@ jobs:
133133 - name : Create Test Report Check Run
134134 id : create_test_report
135135 if : steps.no_changes.outputs.status != 'cancelled'
136- env :
137- GH_TOKEN : ${{ github.token }}
138- run : |
139- # Get current commit SHA
140- HEAD_SHA="${{ github.event.pull_request.head.sha || github.sha }}"
141- echo "Creating test report check run for commit: $HEAD_SHA"
142-
143- # Create a new check run for test results
144- if [ -f "airbyte/airbyte-ci/connectors/pipelines/pipeline_reports/output.json" ]; then
145- gh api \
146- --method POST \
147- -H "Accept: application/vnd.github+json" \
148- -H "X-GitHub-Api-Version: 2022-11-28" \
149- repos/${{ github.repository }}/check-runs \
150- -f name="${{ matrix.connector }} Test Report" \
151- -f head_sha="$HEAD_SHA" \
152- -f status="in_progress" \
153- -f started_at="$(date -u +'%Y-%m-%dT%H:%M:%SZ')"
154- fi
136+ uses :
LouisBrunner/[email protected] 137+ with :
138+ token : ${{ github.token }}
139+ name : " ${{ matrix.connector }} Test Report"
140+ status : " in_progress"
141+ output : |
142+ {
143+ "title": "Test Report",
144+ "summary": "Test execution in progress..."
145+ }
155146 - name : Test Connector
156147 if : steps.no_changes.outputs.status != 'cancelled'
157148 timeout-minutes : 90
@@ -229,31 +220,34 @@ jobs:
229220
230221 # Update the test report check run with results
231222 - name : Update Test Report Check Run
232- if : always() && steps.no_changes.outputs.status != 'cancelled'
233- env :
234- GH_TOKEN : ${{ github.token }}
235- run : |
236- # Only proceed if we have a report
237- if [ -f "airbyte/airbyte-ci/connectors/pipelines/pipeline_reports/output.json" ]; then
238- HEAD_SHA="${{ github.event.pull_request.head.sha || github.sha }}"
239-
240- # Get report details
241- html_report_url="${{ steps.evaluate_output.outputs.html_report_url }}"
242- success="${{ steps.evaluate_output.outputs.success }}"
243-
244- # Update the test report check run
245- gh api \
246- --method POST \
247- -H "Accept: application/vnd.github+json" \
248- -H "X-GitHub-Api-Version: 2022-11-28" \
249- repos/${{ github.repository }}/check-runs \
250- -f name="${{ matrix.connector }} Test Report" \
251- -f head_sha="$HEAD_SHA" \
252- -f status="completed" \
253- -f conclusion="${{ steps.evaluate_output.outputs.success == 'true' && 'success' || 'failure' }}" \
254- -f details_url="$html_report_url" \
255- -f output="{\"title\":\"Test Results\",\"summary\":\"Click 'Details' to view the full test report.\"}"
256- fi
223+ if : always() && steps.no_changes.outputs.status != 'cancelled' && steps.evaluate_output.outcome == 'success'
224+ uses :
LouisBrunner/[email protected] 225+ with :
226+ token : ${{ github.token }}
227+ name : " ${{ matrix.connector }} Test Report"
228+ status : " completed"
229+ conclusion : " ${{ steps.evaluate_output.outputs.success == 'true' && 'success' || 'failure' }}"
230+ details_url : " ${{ steps.evaluate_output.outputs.html_report_url }}"
231+ output : |
232+ {
233+ "title": "Test Results",
234+ "summary": "Click 'Details' to view the full test report."
235+ }
236+
237+ # Create failure check if report generation failed
238+ - name : Create Report Generation Failed Check
239+ if : always() && steps.no_changes.outputs.status != 'cancelled' && steps.evaluate_output.outcome != 'success'
240+ uses :
LouisBrunner/[email protected] 241+ with :
242+ token : ${{ github.token }}
243+ name : " ${{ matrix.connector }} Test Report"
244+ status : " completed"
245+ conclusion : " failure"
246+ output : |
247+ {
248+ "title": "Test Report Generation Failed",
249+ "summary": "The test execution failed to generate a report. Please check the job logs for details."
250+ }
257251
258252 # Upload the job output to the artifacts
259253 - name : Upload Job Output
0 commit comments