File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -137,11 +137,28 @@ jobs:
137137 - name : Run tests
138138 env :
139139 PYTEST_DISCORD_WEBHOOK : ${{ secrets.PYTEST_DISCORD_WEBHOOK }}
140- run : tox -e cov
140+ REPORT_OUTPUT : md_report.md
141+ run : |
142+ echo "REPORT_FILE=${REPORT_OUTPUT}" >> "$GITHUB_ENV"
143+ tox -e py -- --md-report-output "${REPORT_OUTPUT}"
141144
142145 - run : ls -alR
143146 if : ${{ matrix.os != 'windows-latest' }}
144147
148+ - name : Output reports to the job summary when tests fail
149+ if : failure()
150+ shell : bash
151+ run : |
152+ if [ -f "$REPORT_FILE" ]; then
153+ echo "<details><summary>Failed Test Report</summary>" >> $GITHUB_STEP_SUMMARY
154+ echo "" >> $GITHUB_STEP_SUMMARY
155+ cat "$REPORT_FILE" >> $GITHUB_STEP_SUMMARY
156+ echo "" >> $GITHUB_STEP_SUMMARY
157+ echo "</details>" >> $GITHUB_STEP_SUMMARY
158+ else
159+ echo "No failed tests to report"
160+ fi
161+
145162 - name : Install coveralls
146163 run : python -m pip install --upgrade --disable-pip-version-check coveralls tomli
147164
You can’t perform that action at this time.
0 commit comments