From: ashishj1729 Date: Fri, 7 Nov 2025 12:37:59 +0000 (+0530) Subject: Update Github_workflow to run component-tests X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=775e76b31476c300c80a352ab4d8ed4c088d2266;p=aiml-fw%2Fawmf%2Fmodelmgmtservice.git Update Github_workflow to run component-tests Updating Github-Workflow to run component-tests and generate html report. Issue-Id: AIMLFW-310 Change-Id: Idf5aa3ff651f8f88d88d26ad3f439c73a0f4dd04 Signed-off-by: ashishj1729 --- diff --git a/.github/workflows/gerrit-verify.yaml b/.github/workflows/gerrit-verify.yaml index 36475a8..fdcefcc 100644 --- a/.github/workflows/gerrit-verify.yaml +++ b/.github/workflows/gerrit-verify.yaml @@ -175,6 +175,24 @@ jobs: - name: list mme pod run: kubectl get pods -n traininghost + + - name: run regression test + run: | + cd $GITHUB_WORKSPACE + pip install -r component-testing/tests/requirements.txt + + kubectl port-forward svc/mme-modelmgmtservice -n traininghost 32007:8082 & PF_PID=$! + sleep 1 + python3 -m pytest component-testing/tests/ --maxfail=1 --disable-warnings -q --html=pytest_report.html + + # Stop port-forwarding + kill $PF_PID + + - name: Upload Test Report + uses: actions/upload-artifact@v4 + with: + name: pytest-report + path: pytest_report.html vote: if: ${{ always() }} diff --git a/component-testing/tests/requirements.txt b/component-testing/tests/requirements.txt index 06625aa..f107333 100644 --- a/component-testing/tests/requirements.txt +++ b/component-testing/tests/requirements.txt @@ -15,5 +15,6 @@ # limitations under the License. # # ================================================================================== +requests pytest pytest-html \ No newline at end of file