ci: twister: add twister report analysis

Added steps to analyze Twister reports and upload the results
if Twister build fails

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
This commit is contained in:
Grzegorz Chwierut 2025-02-06 18:27:40 +01:00 committed by Benjamin Cabé
commit 7eef57f591

View file

@ -243,6 +243,31 @@ jobs:
check_name: Unit Test Results check_name: Unit Test Results
files: "**/twister.xml" files: "**/twister.xml"
comment_mode: off comment_mode: off
- name: Check out source code
if: failure()
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
persist-credentials: false
- name: Analyze Twister Reports
if: failure()
run: |
./scripts/ci/twister_report_analyzer.py artifacts/*/*/twister.json --long-summary --platforms --output-md errors.md
echo '### Error Summary! 🚀' >> $GITHUB_STEP_SUMMARY
cat errors.md >> $GITHUB_STEP_SUMMARY
- name: Upload Twister Analysis Results
if: failure()
uses: actions/upload-artifact@v4
with:
name: Twister Analysis Results
if-no-files-found: ignore
path: |
twister_report_summary.json
twister-status-check: twister-status-check:
if: always() if: always()
name: "Check Twister Status" name: "Check Twister Status"