Skip to content

Commit

Permalink
fix: Add Manage,Discovery to end-to-end Functional Testing (#318)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
kdivya153 and kschrief authored Sep 25, 2024
1 parent 0270f4c commit 41fdf27
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/run-standalone-mfos-tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Core SDK - MFOS standalone sanity report
name: MFOS standalone sanity report - CORE,MANAGE,DISCOVERY

on:
pull_request:
Expand All @@ -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
Expand All @@ -31,4 +32,7 @@ jobs:

- name: Get results from report.json
run: |
./.github/workflows/utils.sh getResults
./.github/workflows/utils.sh getResults
4 changes: 2 additions & 2 deletions .github/workflows/utils.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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}
`;
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 41fdf27

Please sign in to comment.