Skip to content
Merged
Show file tree
Hide file tree
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
23 changes: 11 additions & 12 deletions .github/workflows/integration-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,24 +84,23 @@ jobs:
with:
pattern: test-runner-summary*
merge-multiple: true
- name: Check for JSON files
- name: Find Summary
id: summary
shell: bash
run: |
if [[ -n "$(find . -maxdepth 1 -name 'test-runner-summary*.json' -print -quit)" ]]; then
echo "has_matching_json_files=true" >> "$GITHUB_OUTPUT"
SUMMARY=$(find . -maxdepth 3 -name '*summary.json' -print)
if [[ -n "$SUMMARY" ]]; then
echo "summary=$SUMMARY" >> "$GITHUB_OUTPUT"
echo "Files matching the pattern test-runner-summary*.json found in the directory"
summary_dir=$(dirname "$SUMMARY")
jq -s '[.[] | .[]]' $summary_dir/*summary.json > combined.json
echo "Files found in the directory"
else
echo "has_matching_json_files=false" >> "$GITHUB_OUTPUT"
echo "summary=false" >> "$GITHUB_OUTPUT"
echo "No files matching the pattern test-runner-summary*.json found in the directory"
fi
id: check_matching_json_files
- name: Combine JSON files
if: ${{ steps.check_matching_json_files.outputs.has_matching_json_files == 'true' }}
run: |
jq -s '[.[] | .[]]' *.json > combined.json
echo "Files found in the directory"
- name: Generate TXT file
if: ${{ steps.check_matching_json_files.outputs.has_matching_json_files == 'true' }}
if: ${{ steps.summary.outputs.summary != 'false' }}
run: |
{
echo "### Integration Test Results"
Expand All @@ -119,7 +118,7 @@ jobs:
fi
} >> output.txt
- name: PR-comment
if: ${{ steps.check_matching_json_files.outputs.has_matching_json_files == 'true' }}
if: ${{ steps.summary.outputs.summary == 'true' }}
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 # v2.9.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@ logs/
models-perf/
output/
site
test-runner-summary-output.json
venv/
2 changes: 1 addition & 1 deletion test-runner/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,5 @@ runs:
if: always()
with:
name: test-runner-summary ${{ env.test }}
path: test-runner-summary*.json
path: ${{ inputs.test_dir }}/logs/*summary.json
overwrite: true
2 changes: 1 addition & 1 deletion test-runner/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def get_test_list(args: dict, tests_yaml: List[dict]):
break
summary.append([idx + 1, test.name, "PASS"])
json_summary.append({"Group": test_group, "Test": test.name, "Status": "PASS"})
json_summary_path = f"test-runner-summary-{test_group}.json"
json_summary_path = f"{args.logs_path}/{test_group.replace('/', '-')}-summary.json"

with open(json_summary_path, "w", encoding="utf-8") as file:
json.dump(json_summary, file, indent=4)
Expand Down