-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generated new automated all workflow, based on STMD [actions skip]
- Loading branch information
Showing
3 changed files
with
154 additions
and
0 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
.github/workflows/No.0.RequirementsPhase.DefineModelRequirements.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: No_0_RequirementsPhase_DefineModelRequirements | ||
on: | ||
workflow_call: | ||
outputs: | ||
summary: | ||
value: ${{jobs.No_0_RequirementsPhase_DefineModelRequirements.outputs.summary}} | ||
secrets: | ||
WRITE_WORKFLOW: | ||
required: true | ||
jobs: | ||
No_0_RequirementsPhase_DefineModelRequirements: | ||
runs-on: ubuntu-20.04 | ||
outputs: | ||
summary: ${{steps.outputStep.outputs.summary}} | ||
steps: | ||
- name: checkout repo | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
token: ${{ secrets.WRITE_WORKFLOW }} | ||
- name: set STMD Folder path | ||
run: echo 'STMDFOLDERPATH=/home/runner/work/gaiax-ci/gaiax-ci' >> $GITHUB_ENV && echo $STMDFOLDERPATH | ||
- name: install prerequisites | ||
run: sudo chmod +x /home/runner/work/gaiax-ci/gaiax-ci/processing_functions/prerequisites/install_node_utilities.sh && sudo /home/runner/work/gaiax-ci/gaiax-ci/processing_functions/prerequisites/install_node_utilities.sh | ||
- name: activate NodeJS version 18.17.0 for metric | ||
./quality_metrics/node_metrics/level_1/checkSingleSemantic | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.17.0 | ||
- name: Remove node_modules, reset libs | ||
run: | | ||
npm ls --parseable --depth=0 | tail -n +2 | awk -F'/' '{print $NF}' | xargs -r npm uninstall | ||
- name: install node module | ||
run: npm install --prefix /home/runner/work/gaiax-ci/gaiax-ci/quality_metrics/node_metrics/level_1 /home/runner/work/gaiax-ci/gaiax-ci/quality_metrics/node_metrics/level_1 | ||
- name: requirement_check_001 | ||
run: res=$(node -e 'const {wrapper} = require("/home/runner/work/gaiax-ci/gaiax-ci/workflow_utils/wrapper/fcnWrapperNode"); let nodeResult = wrapper("./quality_metrics/node_metrics/level_1", "checkSingleSemantic", ["x509Certificate","signedExpertStatement"], ["./data/cert_ahmann.crt","./data/expertStatement_req_m_01.json"], ["file","file"], "/home/runner/work/gaiax-ci/gaiax-ci", {"level":"1","id":"requirement_check_001"}); process.stdout.write(JSON.stringify(nodeResult));') && echo $res && node /home/runner/work/gaiax-ci/gaiax-ci/workflow_utils/results.js -p "$res" -o No.0.RequirementsPhase.DefineModelRequirements.cdkResult.json | ||
- name: show report | ||
run: cat No.0.RequirementsPhase.DefineModelRequirements.cdkResult.json | ||
- name: send to outputs | ||
id: outputStep | ||
run: echo "summary=$(cat | ||
No.0.RequirementsPhase.DefineModelRequirements.cdkResult.json)" >> | ||
$GITHUB_OUTPUT |
58 changes: 58 additions & 0 deletions
58
.github/workflows/No.1.ImplementationPhase.ImplementModel.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: No_1_ImplementationPhase_ImplementModel | ||
on: | ||
workflow_call: | ||
outputs: | ||
summary: | ||
value: ${{jobs.No_1_ImplementationPhase_ImplementModel.outputs.summary}} | ||
secrets: | ||
WRITE_WORKFLOW: | ||
required: true | ||
jobs: | ||
No_1_ImplementationPhase_ImplementModel: | ||
runs-on: ubuntu-20.04 | ||
outputs: | ||
summary: ${{steps.outputStep.outputs.summary}} | ||
steps: | ||
- name: checkout repo | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
token: ${{ secrets.WRITE_WORKFLOW }} | ||
- name: set STMD Folder path | ||
run: echo 'STMDFOLDERPATH=/home/runner/work/gaiax-ci/gaiax-ci' >> $GITHUB_ENV && echo $STMDFOLDERPATH | ||
- name: activate required python version at simple processing element | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.12" | ||
- name: Create lib environment, reset all libs | ||
run: | | ||
pip freeze | xargs -r pip uninstall -y | ||
- name: install python requirements, if necessary | ||
run: | | ||
[ -f /home/runner/work/gaiax-ci/gaiax-ci/processing_functions/python_functions/requirements.txt ] && pip install -r /home/runner/work/gaiax-ci/gaiax-ci/processing_functions/python_functions/requirements.txt | ||
- name: join_and_sort_data | ||
run: res=$(python -c 'import sys; sys.path.append("/home/runner/work/gaiax-ci/gaiax-ci/workflow_utils/wrapper"); from fcnWrapperPython import wrapper; result = wrapper("./processing_functions/python_functions/utilities", "join_sort_unique", ["array2","array1"], ["./data/my_testdata.txt","[4, 8, 7, 5, 4]"], ["file","inline"], "/home/runner/work/gaiax-ci/gaiax-ci", {"id":"join_and_sort_data"}, False); print(result)') && echo $res && mkdir -p /home/runner/work/gaiax-ci/gaiax-ci/data && echo $res > /home/runner/work/gaiax-ci/gaiax-ci/data/merged_data.txt | ||
- name: activate required python version 3.12 for metric | ||
./quality_metrics/python_metrics/fmu_metrics/check_model_description | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.12" | ||
- name: Create lib environment, reset all libs | ||
run: | | ||
pip freeze | xargs -r pip uninstall -y | ||
- name: install python requirements, if necessary | ||
run: | | ||
[ -f /home/runner/work/gaiax-ci/gaiax-ci/quality_metrics/python_metrics/requirements.txt ] && pip install -r /home/runner/work/gaiax-ci/gaiax-ci/quality_metrics/python_metrics/requirements.txt | ||
- name: execute test implementation_fmu_modeldesc_test | ||
run: res=$(python -c 'import sys; sys.path.append("/home/runner/work/gaiax-ci/gaiax-ci/workflow_utils/wrapper"); from fcnWrapperPython import wrapper; result = wrapper("./quality_metrics/python_metrics/fmu_metrics", "check_model_description", ["fmu_path"], ["/home/runner/work/gaiax-ci/gaiax-ci/data/sl-1-3-object-based-generic-perception-object-model.fmu"], ["path"], "/home/runner/work/gaiax-ci/gaiax-ci", {"level":"1","id":"implementation_fmu_modeldesc_test"}); print(result)') && echo $res && node /home/runner/work/gaiax-ci/gaiax-ci/workflow_utils/results.js -p "$res" -o No.1.ImplementationPhase.ImplementModel.cdkResult.json | ||
- name: show report | ||
run: cat No.1.ImplementationPhase.ImplementModel.cdkResult.json | ||
- name: send to outputs | ||
id: outputStep | ||
run: echo "summary=$(cat | ||
No.1.ImplementationPhase.ImplementModel.cdkResult.json)" >> | ||
$GITHUB_OUTPUT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: process-phase-testing-pipelines | ||
on: | ||
workflow_run: | ||
workflows: | ||
- create-workflows | ||
types: | ||
- completed | ||
jobs: | ||
run-all-workflows: | ||
runs-on: ubuntu-20.04 | ||
needs: | ||
- No_0_RequirementsPhase_DefineModelRequirements | ||
- No_1_ImplementationPhase_ImplementModel | ||
steps: | ||
- name: checkout simulation data | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
token: ${{ secrets.WRITE_WORKFLOW }} | ||
- name: install prerequisites | ||
run: > | ||
npm install yaml --prefix ./workflow_utils | ||
npm install ./workflow_utils/stmd-crud --prefix | ||
./workflow_utils/stmd-crud | ||
- name: make output folder | ||
run: mkdir -p ./.github/outputs | ||
- env: | ||
GithubBranch: ${{github.ref_name}} | ||
GithubRepoName: ${{github.event.repository.name}} | ||
GithubOwner: ${{github.repository_owner}} | ||
No_0_RequirementsPhase_DefineModelRequirements: ${{needs.No_0_RequirementsPhase_DefineModelRequirements.outputs.summary}} | ||
No_1_ImplementationPhase_ImplementModel: ${{needs.No_1_ImplementationPhase_ImplementModel.outputs.summary}} | ||
allActionList: No_0_RequirementsPhase_DefineModelRequirements,No_1_ImplementationPhase_ImplementModel, | ||
run: node ./workflow_utils/results.js -s -o summary.md && cat summary.md >> | ||
$GITHUB_STEP_SUMMARY | ||
- name: push results | ||
run: | | ||
git config --global user.name "Add results" | ||
git config --global user.email "[email protected]" | ||
git add ./.github/outputs | ||
git commit -m "Add results [actions skip]" | ||
git push | ||
No_0_RequirementsPhase_DefineModelRequirements: | ||
uses: virtual-vehicle/gaiax-ci/.github/workflows/No.0.RequirementsPhase.DefineModelRequirements.yaml@main | ||
secrets: | ||
WRITE_WORKFLOW: ${{secrets.WRITE_WORKFLOW}} | ||
No_1_ImplementationPhase_ImplementModel: | ||
uses: virtual-vehicle/gaiax-ci/.github/workflows/No.1.ImplementationPhase.ImplementModel.yaml@main | ||
secrets: | ||
WRITE_WORKFLOW: ${{secrets.WRITE_WORKFLOW}} |