ci: twister: fix steps for analyzing failures
Checkout code early, so files are downloaded and read from one single place. Check for job results, only run script on failures. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
f3bdd2bc8c
commit
d3253a1adf
1 changed files with 14 additions and 12 deletions
26
.github/workflows/twister.yaml
vendored
26
.github/workflows/twister.yaml
vendored
|
@ -217,6 +217,14 @@ jobs:
|
||||||
if: success() || failure()
|
if: success() || failure()
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Check out source code
|
||||||
|
if: needs.twister-build.result == 'failure'
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
fetch-depth: 0
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Download Artifacts
|
- name: Download Artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
@ -244,23 +252,17 @@ jobs:
|
||||||
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
|
- name: Analyze Twister Reports
|
||||||
if: failure()
|
if: needs.twister-build.result == 'failure'
|
||||||
run: |
|
run: |
|
||||||
./scripts/ci/twister_report_analyzer.py artifacts/*/*/twister.json --long-summary --platforms --output-md errors.md
|
./scripts/ci/twister_report_analyzer.py artifacts/*/*/twister.json --long-summary --platforms --output-md errors.md
|
||||||
echo '### Error Summary! 🚀' >> $GITHUB_STEP_SUMMARY
|
if [[ -s "errors.md" ]]; then
|
||||||
cat errors.md >> $GITHUB_STEP_SUMMARY
|
echo '### Error Summary! 🚀' >> $GITHUB_STEP_SUMMARY
|
||||||
|
cat errors.md >> $GITHUB_STEP_SUMMARY
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Upload Twister Analysis Results
|
- name: Upload Twister Analysis Results
|
||||||
if: failure()
|
if: needs.twister-build.result == 'failure'
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Twister Analysis Results
|
name: Twister Analysis Results
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue