diff --git a/.github/workflows/integration-test.yaml b/.github/workflows/integration-test.yaml index 7e3b05bf..36128d6e 100644 --- a/.github/workflows/integration-test.yaml +++ b/.github/workflows/integration-test.yaml @@ -103,9 +103,21 @@ jobs: - name: Generate TXT file if: ${{ steps.check_matching_json_files.outputs.has_matching_json_files == 'true' }} run: | - echo "| Test-Group | Test | Status |" > output.txt - echo "|---------------|-------------|----------|" >> output.txt - jq -r '.[] | "| \(.Group) | \(.Test) | \(.Status) |" ' combined.json >> output.txt + { + echo "### Integration Test Results" + echo "Groups Tested: $(jq -r 'map(.Group) | unique | join(", ")' combined.json)" + echo -e "\n
" + echo -e " Results\n" + echo " | Test-Group | Test | Status |" + echo " |:----:|:---:|:---:|" + jq -r '.[] | " | \(.Group) | \(.Test) | \(.Status) |"' combined.json + echo -e "\n
\n" + if jq -e 'all(.[]; .Status == "PASS")' combined.json > /dev/null; then + echo "#### Overall Result: PASS ✅" + else + echo "#### Overall Result: FAIL ❌" + fi + } >> output.txt - name: PR-comment if: ${{ steps.check_matching_json_files.outputs.has_matching_json_files == 'true' }} uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 # v2.9.0 diff --git a/test-runner/test_runner.py b/test-runner/test_runner.py index c3fe3f6a..b455e5e5 100644 --- a/test-runner/test_runner.py +++ b/test-runner/test_runner.py @@ -148,7 +148,7 @@ def get_test_list(args: dict, tests_yaml: List[dict]): rmtree(args.logs_path) os.makedirs(args.logs_path) # Set up Logging for test-runner context - unique_identifier = args.logs_path.replace("/", "-") + test_group = os.path.dirname(args.file_path) logging.basicConfig( level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s", @@ -193,22 +193,20 @@ def get_test_list(args: dict, tests_yaml: List[dict]): logging.error(err) summary.append([idx + 1, test.name, "FAIL"]) json_summary.append( - {"Group": unique_identifier, "Test": test.name, "Status": "FAIL"} + {"Group": test_group, "Test": test.name, "Status": "FAIL"} ) ERROR = True continue except KeyboardInterrupt: summary.append([idx + 1, test.name, "FAIL"]) json_summary.append( - {"Group": unique_identifier, "Test": test.name, "Status": "FAIL"} + {"Group": test_group, "Test": test.name, "Status": "FAIL"} ) ERROR = True break summary.append([idx + 1, test.name, "PASS"]) - json_summary.append( - {"Group": unique_identifier, "Test": test.name, "Status": "PASS"} - ) - json_summary_path = f"test-runner-summary-{unique_identifier}.json" + json_summary.append({"Group": test_group, "Test": test.name, "Status": "PASS"}) + json_summary_path = f"test-runner-summary-{test_group}.json" with open(json_summary_path, "w", encoding="utf-8") as file: json.dump(json_summary, file, indent=4)