diff --git a/.github/workflows/metro_vision_ai_app_recipe_pull_request.yaml b/.github/workflows/metro_vision_ai_app_recipe_pull_request.yaml index 997a3aafa..726a8ecce 100644 --- a/.github/workflows/metro_vision_ai_app_recipe_pull_request.yaml +++ b/.github/workflows/metro_vision_ai_app_recipe_pull_request.yaml @@ -146,4 +146,12 @@ jobs: uses: actions/upload-artifact@v4 with: name: Trivy Report - Config scan for Helm - path: metro-ai-suite/metro-vision-ai-app-recipe/trivy-helm.txt \ No newline at end of file + path: metro-ai-suite/metro-vision-ai-app-recipe/trivy-helm.txt + sanity: + uses: ./.github/workflows/metro_vision_ai_app_recipe_sanity.yaml + with: + branch: ${{ github.head_ref }} + secrets: inherit + permissions: + contents: read + packages: write \ No newline at end of file diff --git a/.github/workflows/spineapp_pull_request.yaml b/.github/workflows/spineapp_pull_request.yaml index 6ba68d87b..5056a90b2 100644 --- a/.github/workflows/spineapp_pull_request.yaml +++ b/.github/workflows/spineapp_pull_request.yaml @@ -142,7 +142,7 @@ jobs: cd manufacturing-ai-suite/industrial-edge-insights-vision/helm sed -i "s/username:*/username: user/g" values.yaml sed -i "s/password:*/password: password/g" values.yaml - trivy config . >> trivy-Spineapp-helm.txt + trivy config . -s HIGH,CRITICAL >> trivy-Spineapp-helm.txt - name: Upload Scan artifact to Github uses: actions/upload-artifact@v4 diff --git a/.github/workflows/spineapp_sanity.yaml b/.github/workflows/spineapp_sanity.yaml index 41a0bf56d..75aff9260 100644 --- a/.github/workflows/spineapp_sanity.yaml +++ b/.github/workflows/spineapp_sanity.yaml @@ -57,27 +57,30 @@ jobs: run: | sudo apt-get update sudo pip install robotframework - lspci | grep -i vga sudo apt install -y python3-nose libxml2-utils vlc cd edge-ai-suites-repo/manufacturing-ai-suite/industrial-edge-insights-vision/tests/robot_files - robot test.robot || true & - sleep 480 - docker logs dlstreamer-pipeline-server >> dlsps_logs.txt & - wait - mkdir -p /tmp/test_results - cp -r report.html log.html output.xml dlsps_logs.txt /tmp/test_results/ - passed=$(xmllint --xpath "//return/status[@status='PASS']" ./output.xml | wc -l) || true - failed=$(xmllint --xpath "//return/status[@status='FAIL']" ./output.xml | wc -l) || true - not_run=$(xmllint --xpath "//return/status[@status='NOT RUN']" ./output.xml | wc -l) || true - total=$((passed + failed + not_run)) - echo "### Sanity Test Summary" >> $GITHUB_STEP_SUMMARY - echo "- Total: $total" >> $GITHUB_STEP_SUMMARY - echo "- ✅ Passed: $passed" >> $GITHUB_STEP_SUMMARY - echo "- ❌ Failed: $failed" >> $GITHUB_STEP_SUMMARY - echo "- ⏭️ Not Run: $not_run" >> $GITHUB_STEP_SUMMARY - echo "- 📄 [Full Report](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})" >> $GITHUB_STEP_SUMMARY + robot test.robot + + - name: Copy and Publish results + if: always() + run: | + mkdir -p /tmp/test_results + cd edge-ai-suites-repo/manufacturing-ai-suite/industrial-edge-insights-vision/tests/robot_files + cp -r report.html log.html output.xml /tmp/test_results/ + passed=$(xmllint --xpath "//return/status[@status='PASS']" ./output.xml | wc -l) || true + failed=$(xmllint --xpath "//return/status[@status='FAIL']" ./output.xml | wc -l) || true + not_run=$(xmllint --xpath "//return/status[@status='NOT RUN']" ./output.xml | wc -l) || true + total=$((passed + failed + not_run)) + echo "### Sanity Test Summary" >> $GITHUB_STEP_SUMMARY + echo "- Total: $total" >> $GITHUB_STEP_SUMMARY + echo "- ✅ Passed: $passed" >> $GITHUB_STEP_SUMMARY + echo "- ❌ Failed: $failed" >> $GITHUB_STEP_SUMMARY + echo "- ⏭️ Not Run: $not_run" >> $GITHUB_STEP_SUMMARY + echo "- 📄 [Full Report](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})" >> $GITHUB_STEP_SUMMARY + - name: Upload Scan artifact to Github uses: actions/upload-artifact@v4 + if: always() with: name: Sanity_Reports path: /tmp/test_results/* diff --git a/manufacturing-ai-suite/industrial-edge-insights-vision/tests/common_library/utils.py b/manufacturing-ai-suite/industrial-edge-insights-vision/tests/common_library/utils.py index 199918cd3..786a9419b 100644 --- a/manufacturing-ai-suite/industrial-edge-insights-vision/tests/common_library/utils.py +++ b/manufacturing-ai-suite/industrial-edge-insights-vision/tests/common_library/utils.py @@ -61,7 +61,10 @@ def docker_compose_up(self, value): self._update_env_file({ "HOST_IP": hostIP, "MTX_WEBRTCICESERVERS2_0_USERNAME": "test1234", - "MTX_WEBRTCICESERVERS2_0_PASSWORD": "test1234" + "MTX_WEBRTCICESERVERS2_0_PASSWORD": "test1234", + "MR_PSQL_PASSWORD": "test1234", + "MR_MINIO_ACCESS_KEY": "test1234", + "MR_MINIO_SECRET_KEY": "test1234" }) # Run setup and start services diff --git a/metro-ai-suite/metro-vision-ai-app-recipe/test-suite/README.md b/metro-ai-suite/metro-vision-ai-app-recipe/test-suite/README.md index 15b125bda..b38e6f888 100644 --- a/metro-ai-suite/metro-vision-ai-app-recipe/test-suite/README.md +++ b/metro-ai-suite/metro-vision-ai-app-recipe/test-suite/README.md @@ -1,4 +1,4 @@ -# Automation Framework for Industrial Edge Insights Vision +# Automation Framework for Metro Vision AI App This directory contains test scripts and utility functions required for automation testing.