@@ -62,12 +62,38 @@ jobs:
62
62
63
63
- name : Validate modified targets
64
64
if : steps.discover-modified.outputs.changed_targets != ''
65
+ continue-on-error : true
65
66
run : |
66
67
$(poetry env activate)
67
- pytest -q --tb no -rA -m validate_targets -n 20 --chunked-sites "${{ steps.discover-modified.outputs.changed_targets }}"
68
+ pytest -q --tb no -rA -m validate_targets -n 20 --chunked-sites "${{ steps.discover-modified.outputs.changed_targets }}" --junitxml=validation_results.xml
68
69
deactivate
69
70
70
- - name : Announce skip if no modified targets
71
+ - name : Prepare validation summary
72
+ if : steps.discover-modified.outputs.changed_targets != ''
73
+ id : prepare-summary
74
+ run : |
75
+ $(poetry env activate)
76
+ summary=$(
77
+ python devel/summarize_site_validation.py validation_results.xml > summary.md || echo "Failed to generate summary of test results"
78
+ )
79
+ deactivate
80
+ echo "summary<<EOF" >> $GITHUB_OUTPUT
81
+ echo "$summary" >> $GITHUB_OUTPUT
82
+ echo "EOF" >> $GITHUB_OUTPUT
83
+
84
+ - name : Announce validation results
85
+ if : steps.discover-modified.outputs.changed_targets != ''
86
+ uses : actions/github-script@v8
87
+ with :
88
+ script : |
89
+ github.rest.issues.createComment({
90
+ issue_number: context.payload.pull_request.number,
91
+ owner: context.repo.owner,
92
+ repo: context.repo.repo,
93
+ body: `${{ steps.prepare-summary.outputs.summary }}`
94
+ });
95
+
96
+ - name : This step shows as ran when no modifications are found
71
97
if : steps.discover-modified.outputs.changed_targets == ''
72
98
run : |
73
99
echo "No modified targets found"
0 commit comments