From caa07fee831ca3dd65fe98a7112a0aab210cad1c Mon Sep 17 00:00:00 2001 From: root Date: Mon, 15 Jan 2024 16:01:04 +0100 Subject: [PATCH] first commit --- .github/workflows/create_testing_pipeline.yml | 2 +- util/stmd/json_to_yaml.js | 22 ++----------------- util/stmd/results.js | 4 ++-- 3 files changed, 5 insertions(+), 23 deletions(-) diff --git a/.github/workflows/create_testing_pipeline.yml b/.github/workflows/create_testing_pipeline.yml index dcddcbf..061cc02 100644 --- a/.github/workflows/create_testing_pipeline.yml +++ b/.github/workflows/create_testing_pipeline.yml @@ -25,7 +25,7 @@ jobs: # The push will NOT trigger an infinite loop, see https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow run: | git config --global user.name "Automated Test Pipeline" - git config --global user.email "levanthanh3005@users.noreply.github.com" + git config --global user.email "setlabs@users.noreply.github.com" git add ./.github/workflows git commit -m "Generated new automated test pipeline, based on STMD [actions skip]" diff --git a/util/stmd/json_to_yaml.js b/util/stmd/json_to_yaml.js index 8825ea9..660fdc4 100644 --- a/util/stmd/json_to_yaml.js +++ b/util/stmd/json_to_yaml.js @@ -94,17 +94,6 @@ function jsonToYaml(cdkElements, outputFile, basename, stmdFolderPath) { run: "cat " + outputFile }); - // add summary step - // yaml_struct.jobs[basename].steps.push({ - // name: "test report", - // run: "cat " + outputFile + " >> $GITHUB_STEP_SUMMARY && cat " + outputFile +"" - // }); - - // yaml_struct.jobs[basename].steps.push({ - // name: "push results", - // run: "git config --global user.name \"levanthanh3005\" && git config --global user.email \"levanthanh3005@users.noreply.github.com\" && git pull origin main && cp "+outputFile+" ./.github/ && git add ./.github/"+outputFile+" && git commit -m \"add results "+outputFile+" [actions skip]\" -a && git push" - // }); - yaml_struct.jobs[basename].steps.push({ name: "send to outputs", id: "outputStep", @@ -135,18 +124,11 @@ function allToYaml(actionList) { } }, "jobs": { - // "No_0_RequirementsPhase_DefineModelRequirements": { - // "uses": "levanthanh3005/upsim-ci-2/.github/workflows/No.0.RequirementsPhase.DefineModelRequirements.yaml@main" - // }, "all": { "runs-on": "ubuntu-20.04", "needs": [ - // "No_0_RequirementsPhase_DefineModelRequirements" ], "steps": [ - // { - // "run": "rs=\"${{needs.No_0_RequirementsPhase_DefineModelRequirements.outputs.summary}}\"\necho $rs > all.txt\ncat all.txt > $GITHUB_STEP_SUMMARY\necho \"----\"\n# echo [${{needs.No_1_RequirementsPhase_DefineParameterRequirements.outputs}}]\n" - // } { "name": "checkout simulation data", "uses": "actions/checkout@v4", @@ -177,7 +159,7 @@ function allToYaml(actionList) { if (typeof actionList[e] === "string") { var fileName = actionList[e].replaceAll("_","."); allJson["jobs"][actionList[e]] = { - "uses": "levanthanh3005/upsim-ci-2/.github/workflows/"+fileName+".yaml@main", + "uses": "virtual-vehicle/upsim-ci/.github/workflows/"+fileName+".yaml@main", "secrets" : { "WRITE_WORKFLOW" : "${{secrets.WRITE_WORKFLOW}}" } @@ -200,7 +182,7 @@ function allToYaml(actionList) { allJson["jobs"]["all"]["steps"].push({ "name": "push new test pipeline", - "run": "git config --global user.name \"Add results\"\ngit config --global user.email \"levanthanh3005@users.noreply.github.com\"\n\ngit add ./.github/outputs\ngit commit -m \"Add results [actions skip]\"\ngit push\n" + "run": "git config --global user.name \"Add results\"\ngit config --global user.email \"setlabs@users.noreply.github.com\"\n\ngit add ./.github/outputs\ngit commit -m \"Add results [actions skip]\"\ngit push\n" }); let yaml_string = yaml.stringify(allJson); diff --git a/util/stmd/results.js b/util/stmd/results.js index 977311c..218a512 100644 --- a/util/stmd/results.js +++ b/util/stmd/results.js @@ -75,9 +75,9 @@ if (isSinglePhase == true) { if (minLevel < reportByPhase[phaseName]["reachedLevel"]) { reportByPhase[phaseName]["reachedLevel"] = minLevel; } - // https://github.com/levanthanh3005/upsim-ci-2/actions/workflows/No.0.RequirementsPhase.DefineModelRequirements.yaml + // https://github.com/virtual-vehicle/upsim-ci/actions/workflows/No.0.RequirementsPhase.DefineModelRequirements.yaml let fileName = actionList[a].replaceAll("_","."); - let fileURL = "https://github.com/levanthanh3005/upsim-ci-2/blob/main/.github/outputs/"+fileName+".json"; + let fileURL = "https://github.com/virtual-vehicle/upsim-ci/blob/main/.github/outputs/"+fileName+".json"; valueOutput += "| "+phaseName+" | "+stepName+" | "+passedCount+"/"+ rs.length + "|" + minLevel +" | [view]("+fileURL+") | \n"