From 202fe5f2f477c7765f54865753aa70488d55ef92 Mon Sep 17 00:00:00 2001 From: kdivya153 <121901963+kdivya153@users.noreply.github.com> Date: Wed, 25 Sep 2024 10:24:35 -0400 Subject: [PATCH] fix: Add Manage,Discovery to end-to-end Functional Testing (#318) * fix: MFOS Sanity for Manage,discovery MFOS Sanity for Manage,discovery * fix: Fixed run-standalone * fix * fix: updated module * Added echo * added logs * Added more loogs * updated module * added echo * replaced string literals * updated with runTest * Changes to FCA * Teesting * update * updated * cloning * updated port * updated dynamic module * removed core * updated manage * Update run-standalone-mfos-tests.yml * Update run-standalone-mfos-tests.yml * Added checking port back * Update run-standalone-mfos-tests.yml * Update run-standalone-mfos-tests.yml * Update utils.sh * Update utils.sh * Update utils.sh * Update run-standalone-mfos-tests.yml * Update run-standalone-mfos-tests.yml * Update utils.sh * Update run-standalone-mfos-tests.yml * Aded intent * Update run-standalone-mfos-tests.yml * Running for all 3 * Update run-standalone-mfos-tests.yml * Update utils.sh * Update utils.sh * Update pr-comment.yml * Changed the workflow name * updated PR comments * changed the yml name * Added * Update utils.sh * Update run-standalone-mfos-tests.yml * Changes to the workflow name --------- Co-authored-by: kschrief --- .github/workflows/pr-comment.yml | 2 +- .github/workflows/run-standalone-mfos-tests.yml | 14 +++++++++----- .github/workflows/utils.cjs | 4 ++-- .github/workflows/utils.sh | 7 ++++++- 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pr-comment.yml b/.github/workflows/pr-comment.yml index 03dd88bc5..e27cc3ddc 100644 --- a/.github/workflows/pr-comment.yml +++ b/.github/workflows/pr-comment.yml @@ -5,7 +5,7 @@ on: types: - "completed" workflows: - - "Core SDK - MFOS standalone sanity report" + - "MFOS standalone sanity report - CORE,MANAGE,DISCOVERY" jobs: comment-on-pr: diff --git a/.github/workflows/run-standalone-mfos-tests.yml b/.github/workflows/run-standalone-mfos-tests.yml index 54f281328..073376aa0 100644 --- a/.github/workflows/run-standalone-mfos-tests.yml +++ b/.github/workflows/run-standalone-mfos-tests.yml @@ -1,4 +1,4 @@ -name: Core SDK - MFOS standalone sanity report +name: MFOS standalone sanity report - CORE,MANAGE,DISCOVERY on: pull_request: @@ -14,14 +14,15 @@ jobs: - name: Checkout uses: actions/checkout@v2 - - name: Run tests and create assets + #Run tests + - name: Run Core Manage and Discovery tests and create assets env: EVENT_NAME: ${{ github.event_name }} GITHUB_REF: ${{ github.ref }} PR_HEAD_REF: ${{ github.event.pull_request.head.ref }} - INTENT: ${{ secrets.INTENT }} + INTENT: ${{ vars.INTENT }} run: | - ./.github/workflows/utils.sh runTests + ./.github/workflows/utils.sh runTests - name: Upload report.json as an artifact uses: actions/upload-artifact@v4 @@ -31,4 +32,7 @@ jobs: - name: Get results from report.json run: | - ./.github/workflows/utils.sh getResults \ No newline at end of file + ./.github/workflows/utils.sh getResults + + + \ No newline at end of file diff --git a/.github/workflows/utils.cjs b/.github/workflows/utils.cjs index 32e39a38b..067cc8b9b 100755 --- a/.github/workflows/utils.cjs +++ b/.github/workflows/utils.cjs @@ -34,8 +34,8 @@ async function createComment(github, context) { const { issue_number, Passes, Failures, Pending, Skipped, ARTIFACT_URL, JOB_PATH } = process.env; const body = ` - Core SDK - MFOS standalone sanity report: - Passes - ${Passes} Failures - ${Failures} Pending - ${Pending} Skipped - ${Skipped} + MFOS standalone sanity report - CORE,MANAGE,DISCOVERY: + Total Passes - ${Passes} Failures - ${Failures} Pending - ${Pending} Skipped - ${Skipped} Report JSON/HTML Files: ${ARTIFACT_URL} Job Logs: ${JOB_PATH} `; diff --git a/.github/workflows/utils.sh b/.github/workflows/utils.sh index 13c8e7ff7..772b35866 100755 --- a/.github/workflows/utils.sh +++ b/.github/workflows/utils.sh @@ -36,7 +36,12 @@ function runTests(){ echo "clone fca repo and start it in the background" git clone --branch main https://github.com/rdkcentral/firebolt-certification-app.git cd firebolt-certification-app + echo "Updating Core SDK dependency" jq '.dependencies["@firebolt-js/sdk"] = "file:../firebolt-apis/src/sdks/core"' package.json > package.json.tmp && mv package.json.tmp package.json + echo "Updating Manage SDK dependency" + jq '.dependencies["@firebolt-js/manage-sdk"] = "file:../firebolt-apis/src/sdks/manage"' package.json > package.json.tmp && mv package.json.tmp package.json + echo "Updating Discovery SDK dependency" + jq '.dependencies["@firebolt-js/discovery-sdk"] = "file:../firebolt-apis/src/sdks/discovery"' package.json > package.json.tmp && mv package.json.tmp package.json npm install npm start & sleep 5s @@ -149,7 +154,7 @@ function unzipArtifact(){ # Check argument and call corresponding function if [ "$1" == "runTests" ]; then - runTests + runTests elif [ "$1" == "getResults" ]; then getResults elif [ "$1" == "getArtifactData" ]; then