Skip to content

[CI] Enhance UT check process #1686

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 40 additions & 8 deletions .github/workflows/_linux_ut.yml
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,37 @@ jobs:
if [ -e "ut_failure_list.csv" ];then
cp ut_failure_list.csv ${{ github.workspace }}/ut_log/ut_failure_list.csv
fi
- name: UT Test Results Check
echo "UT_NAME=$(echo ${{ inputs.ut }} |sed 's/,/-/g')" |tee -a "${GITHUB_OUTPUT}" >> "${GITHUB_ENV}"
- name: Upload Inductor XPU UT Log
if: always()
uses: actions/upload-artifact@v4
with:
name: Inductor-XPU-UT-Data-${{ github.event.pull_request.number || github.sha }}-${{ env.UT_NAME }}
path: ${{ github.workspace }}/ut_log
- name: Upload XPU UT Failure list
if: always()
uses: actions/upload-artifact@v4
with:
name: XPU-UT-Failure-List-${{ github.event.pull_request.number || github.sha }}-${{ env.UT_NAME }}
path: ${{ github.workspace }}/ut_log/ut_failure_list.csv

ut_test_results_check:
needs: ut_test
runs-on: ${{ inputs.runner }}
timeout-minutes: 30
env:
GH_TOKEN: ${{ github.token }}
ut_skip_issue: 1624
steps:
- name: Set the UT name
run: |
echo "UT_NAME=$(echo ${{ inputs.ut }} |sed 's/,/-/g')" |tee -a "${GITHUB_OUTPUT}" >> "${GITHUB_ENV}"
- name: Download XPU UT Logs
uses: actions/download-artifact@v4
with:
name: Inductor-XPU-UT-Data-${{ github.event.pull_request.number || github.sha }}-${{ env.UT_NAME }}
path: ${{ github.workspace }}/ut_log
- name: Check UT Results
shell: bash
run: |
repo="${{ github.repository }}"
Expand All @@ -319,21 +349,23 @@ jobs:
$contains_status
cd ${{ github.workspace }}/ut_log/${ut_suite}
gh --repo $repo issue view $ut_skip_issue --json body -q .body | sed '/^$/d' > Known_issue.log
gh api "repos/${{ github.repository }}/issues?labels=skipped" \
--jq '.[] | select(.pull_request == null) | "Issue #\(.number): \(.title)\n\(.body)\n"' \
> issues.log
awk '/Cases:/ {flag=1; next} /^\|\||^$/ {flag=0} flag' issues.log | grep -Eo 'test[^[:space:]]+( \|\| [^[:space:]]+)?' | sed 's/ *|| */ /g' | sort -u > issues_temp.log
awk '$2 == "op_ut" {print $1}' issues_temp.log > issues_op_ut.log
cat issues_temp.log | awk '{print $1}' >> Known_issue.log
awk -F'::' '{print $1}' issues_op_ut.log | sort -u | paste -sd ',' >> Known_issue.log

cp ${{ github.workspace }}/.github/scripts/ut_result_check.sh ./
bash ut_result_check.sh ${ut_suite}
done
- name: Upload Inductor XPU UT Log
if: always()
uses: actions/upload-artifact@v4
with:
name: Inductor-XPU-UT-Data-${{ github.event.pull_request.number || github.sha }}-${{ env.UT_NAME }}
name: Inductor-XPU-UT-Data-${{ github.event.pull_request.number || github.sha }}-${{ env.UT_NAME }}-checked
path: ${{ github.workspace }}/ut_log
- name: Upload XPU UT Failure list
if: always()
uses: actions/upload-artifact@v4
with:
name: XPU-UT-Failure-List-${{ github.event.pull_request.number || github.sha }}-${{ env.UT_NAME }}
path: ${{ github.workspace }}/ut_log/ut_failure_list.csv

distributed_ut_test:
runs-on: pvc_e2e
Expand Down
Loading