Skip to content

Commit

Permalink
fix: updated module
Browse files Browse the repository at this point in the history
  • Loading branch information
kdivya153 committed Sep 17, 2024
1 parent 3154780 commit 6a544d1
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,19 +110,25 @@ function runTests(){
'
echo "Create HTML and JSON assets for ${MODULE}"
npm i mochawesome-report-generator
mkdir -p report/${MODULE}
mv report.json report/${MODULE}/
jq -r '.' report/${MODULE}/report.json > tmp.json && mv tmp.json report/${MODULE}/report.json
jq '.report' report/${MODULE}/report.json > tmp.json && mv tmp.json report/${MODULE}/report.json
mkdir -p report/$MODULE
# Move the report.json to the correct location
if [ -f report.json ]; then
mv report.json report/$MODULE/
else
echo "report.json not found for $MODULE"
exit 1
fi
jq -r '.' report/$MODULE/report.json > tmp.json && mv tmp.json report/$MODULE/report.json
jq '.report' report/$MODULE/report.json > tmp.json && mv tmp.json report/$MODULE/report.json

node -e '
const marge = require("mochawesome-report-generator/bin/cli-main");
marge({
_: ["report/${MODULE}/report.json"],
_: ["report/$MODULE/report.json"],
reportFileName: "report.json",
reportTitle: "FireboltCertificationTestReport",
reportPageTitle: "FireboltCertificationTestReport",
reportDir: "./report/${MODULE}",
reportDir: "./report/$MODULE",
});
'
}
Expand Down

0 comments on commit 6a544d1

Please sign in to comment.