Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Jan 15, 2024
1 parent e110c24 commit caa07fe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/create_testing_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]"
Expand Down
22 changes: 2 additions & 20 deletions util/stmd/json_to_yaml.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 \"[email protected]\" && 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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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}}"
}
Expand All @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions util/stmd/results.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit caa07fe

Please sign in to comment.