Skip to content

Commit

Permalink
Merge pull request #3 from IncQueryLabs/issues/ARUMLPD-35/diff-workflow
Browse files Browse the repository at this point in the history
ARUMLPD-35 diff workflow
  • Loading branch information
patrikkoczka7 authored Oct 1, 2023
2 parents 9c24dc9 + 8069501 commit 9aa10d5
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 5 deletions.
40 changes: 36 additions & 4 deletions .github/workflows/AutosarUmlActionExample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
# The following secrets need to be defined: INCQUERY_USERNAME, INCQUERY_PASSWORD, INCQUERY_AUTOSAR_UML_INTEGRATION_LICENSE

on:
push
push:
paths:
- 'example-arxml'
jobs:
AutosarUml:
defaults:
Expand All @@ -18,15 +20,45 @@ jobs:
- name: Checkout Git repository
uses: actions/checkout@v3

- name: Backup current model
- name: Backup EA Project File
id: backupEAProjectFile
run: |
Copy-Item -Path ./counting-logic.qeax -Destination '${{ runner.temp }}/counting-logic-old.qeax'
$eaFileName = "counting-logic"
$eaFileExtension = "qeax"
$originalEaProjectFile = '${{ runner.temp }}/' + $eaFileName + '-old.' + $eaFileExtension
$reimportedEaProjectFile = '.\' + $eaFileName + '.' + $eaFileExtension
Copy-Item -Path $reimportedEaProjectFile -Destination $originalEaProjectFile
echo "originalEAProjectFile=$originalEaProjectFile" >> $env:GITHUB_OUTPUT
echo "reimportedEAProjectFile=$reimportedEaProjectFile" >> $env:GITHUB_OUTPUT
echo "fileName=$eaFileName" >> $env:GITHUB_OUTPUT
echo "fileExtension=$eaFileExtension" >> $env:GITHUB_OUTPUT
- name: Run IncQuery AUTOSAR-UML Bridge
uses: ./
with:
arxml_folder_path: example-arxml
ea_model_file_path: counting-logic.qeax
ea_model_file_path: "${{steps.backupEAProjectFile.outputs.reimportedEAProjectFile}}"
incquery_username: "${{ secrets.INCQUERY_USERNAME }}"
incquery_password: "${{ secrets.INCQUERY_PASSWORD }}"
license: "${{ secrets.INCQUERY_AUTOSAR_UML_INTEGRATION_LICENSE }}"
#Install LieberLieber LemonTree.Automation on the Action-Runner and prepare the license
#the secrets.LTALICENSE contains the text from the License File provided
- name: GetLTA
uses: LieberLieber/setup-LemonTree.Automation@v1
id: GetLTA
with:
License: ${{secrets.LTALICENSE}}
#Diff Check between the modified files
- name: Calculate differences between the original and reimported EA projects
id: diffOutput
run: |
$diffFile = "${{ runner.temp }}/${{steps.backupEAProjectFile.outputs.fileName}}-${{steps.backupEAProjectFile.outputs.fileExtension}}-diff.ltsfs"
&'${{steps.GetLTA.outputs.LemonTreeAutomationExecutable}}' diff --base '${{steps.backupEAProjectFile.outputs.originalEAProjectFile}}' --theirs '${{steps.backupEAProjectFile.outputs.originalEAProjectFile}}' --mine '${{steps.backupEAProjectFile.outputs.reimportedEAProjectFile}}' --sfs $diffFile
echo "diffSessionFile=$diffFile" >> $env:GITHUB_OUTPUT
#Archive Session Files
- name: Archive Session Files
uses: actions/upload-artifact@v3
with:
name: Diff Session File
path: '${{steps.diffOutput.outputs.diffSessionFile}}'
retention-days: 5
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ runs:
{
echo "IncQuery AUTOSAR-UML Bridge will be installed."
echo "need_to_install=true" >> $env:GITHUB_OUTPUT
echo "download_url=https://build.incquerylabs.com/nexus/repository/incquery-suite-internal-raw/lieberlieber-collaboration/aruml-internal/release-v2023.2.0-build/IncQuery%20AUTOSAR-UML%20Bridge%202023.2.0-build%20Setup.exe" >> $env:GITHUB_OUTPUT
echo "download_url=https://build.incquerylabs.com/nexus/repository/lieberlieber-collaboration-raw/aruml-releases/2023.2.0-build/IncQuery%20AUTOSAR-UML%20Bridge%202023.2.0-build%20Setup.exe" >> $env:GITHUB_OUTPUT
echo "installer_path=${{ runner.temp }}\IncQuery AUTOSAR-UML Bridge Setup.exe" >> $env:GITHUB_OUTPUT
}
Expand Down

0 comments on commit 9aa10d5

Please sign in to comment.