1- # v3.800.12
2- # https://virtocommerce.atlassian.net/browse/VCST-2469
1+ # v3.800.17
2+ # https://virtocommerce.atlassian.net/browse/VCST-2789
33name : Module CI
44
55on :
5454 moduleId : ${{ steps.artifact_ver.outputs.moduleId }}
5555 matrix : ${{ steps.deployment-matrix.outputs.matrix }}
5656 run-e2e : ${{ steps.run-e2e.outputs.result }}
57+ run-ui-tests : ${{ steps.run-ui-tests.outputs.result }}
58+ deployment-folder-exists : ${{ steps.check_deployment_folder.outputs.exists }}
5759
5860 steps :
5961
@@ -91,13 +93,25 @@ jobs:
9193 uses : VirtoCommerce/vc-github-actions/get-image-version@master
9294 id : artifact_ver
9395
96+ - name : Check if .deployment folder exists
97+ id : check_deployment_folder
98+ run : |
99+ if [ -d ".deployment" ]; then
100+ echo "exists=true" >> $GITHUB_OUTPUT
101+ echo "Diagnostic: .deployment folder exists."
102+ else
103+ echo "exists=false" >> $GITHUB_OUTPUT
104+ echo "Diagnostic: .deployment folder does NOT exist."
105+ fi
106+
94107 - name : Set VERSION_SUFFIX variable
95108 run : |
96109 if [ '${{ github.event_name }}' = 'workflow_dispatch' ]; then
97110 echo "VERSION_SUFFIX=${{ steps.artifact_ver.outputs.fullSuffix }}" >> $GITHUB_ENV
98111 else
99112 echo "VERSION_SUFFIX=${{ steps.artifact_ver.outputs.suffix }}" >> $GITHUB_ENV
100113 fi;
114+
101115 - name : Add version suffix
102116 if : ${{ github.ref != 'refs/heads/master' && github.ref != 'refs/heads/main' }}
103117 uses : VirtoCommerce/vc-github-actions/add-version-suffix@master
@@ -183,14 +197,37 @@ jobs:
183197
184198 - name : Check commit message for version number
185199 id : run-e2e
200+ env :
201+ COMMIT_MESSAGE : ${{ github.event.head_commit.message }}
186202 run : |
187- if [[ "${{ github.event.head_commit.message }} " =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]];
203+ if [[ "$COMMIT_MESSAGE " =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]];
188204 then
189205 echo "result=false" >> $GITHUB_OUTPUT
190206 else
191207 echo "result=true" >> $GITHUB_OUTPUT
192208 fi
193209
210+ - name : Look for xapi module in dependencies
211+ id : run-ui-tests
212+ shell : pwsh
213+ run : |
214+ $manifestFile = Get-ChildItem -Path ${{ github.workspace }} -Recurse -Filter "module.manifest" | Where-Object { $_.FullName -like "*/src/*/module.manifest" } | Select-Object -First 1
215+ if (-not $manifestFile) {
216+ Write-Error "No module.manifest file found in src subdirectories"
217+ exit 1
218+ }
219+ Write-Host "Found module.manifest at: $($manifestFile.FullName)"
220+ $manifestContent = Get-Content $manifestFile.FullName -Raw
221+ $containsXapi = 'false'
222+ $dependecies = $(Select-Xml -Content $manifestContent -XPath "//dependencies").Node.dependency
223+ foreach ($dependency in $dependecies) {
224+ if ($dependency.id -eq 'VirtoCommerce.Xapi') {
225+ Write-Host "Found VirtoCommerce.Xapi in dependencies"
226+ $containsXapi = 'true'
227+ }
228+ }
229+ echo "result=$containsXapi" >> $env:GITHUB_OUTPUT
230+
194231 - name : Setup Git Credentials
195232 if : ${{ (github.ref == 'refs/heads/dev' && github.event_name != 'workflow_dispatch') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' }}
196233 uses : VirtoCommerce/vc-github-actions/setup-git-credentials-github@master
@@ -237,11 +274,28 @@ jobs:
237274 run : |
238275 echo "Jira Upload Build Info response: ${{ steps.push_build_info_to_jira.outputs.response }}"
239276
277+ ui-auto-tests :
278+ if : ${{ ((github.ref == 'refs/heads/dev') && (github.event_name == 'push')) ||
279+ (github.event_name == 'workflow_dispatch') || ((github.base_ref == 'dev') && (github.event_name == 'pull_request')) }}
280+ needs : ' ci'
281+ uses : VirtoCommerce/.github/.github/workflows/ui-autotests.yml@v3.800.17
282+ with :
283+ installModules : ' false'
284+ installCustomModule : ' true'
285+ customModuleId : ${{ needs.ci.outputs.moduleId }}
286+ customModuleUrl : ${{ needs.ci.outputs.artifactUrl }}
287+ runTests : ${{ needs.ci.outputs.run-ui-tests }}
288+ vctestingRepoBranch : ' dev'
289+ frontendZipUrl : ' latest'
290+ secrets :
291+ envPAT : ${{ secrets.REPO_TOKEN }}
292+ testSecretEnvFile : ${{ secrets.VC_TESTING_MODULE_ENV_FILE }}
293+
240294 module-katalon-tests :
241295 if : ${{ ((github.ref == 'refs/heads/dev') && (github.event_name == 'push') && (needs.ci.outputs.run-e2e == 'true')) ||
242296 (github.event_name == 'workflow_dispatch') || (github.base_ref == 'dev') && (github.event_name == 'pull_request') }}
243297 needs : ' ci'
244- uses : VirtoCommerce/.github/.github/workflows/e2e.yml@v3.800.12
298+ uses : VirtoCommerce/.github/.github/workflows/e2e.yml@v3.800.17
245299 with :
246300 katalonRepo : ' VirtoCommerce/vc-quality-gate-katalon'
247301 katalonRepoBranch : ' dev'
@@ -257,9 +311,11 @@ jobs:
257311 katalonApiKey : ${{ secrets.KATALON_API_KEY }}
258312
259313 deploy-cloud :
260- if : ${{ (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev') && github.event_name == 'push' }}
314+ if : ${{ (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev')
315+ && github.event_name == 'push'
316+ && needs.ci.outputs.deployment-folder-exists == 'true'}}
261317 needs : ci
262- uses : VirtoCommerce/.github/.github/workflows/deploy-cloud.yml@v3.800.12
318+ uses : VirtoCommerce/.github/.github/workflows/deploy-cloud.yml@v3.800.17
263319 with :
264320 releaseSource : module
265321 moduleId : ${{ needs.ci.outputs.moduleId }}
@@ -268,4 +324,4 @@ jobs:
268324 jiraKeys : ${{ needs.ci.outputs.jira-keys }}
269325 argoServer : ' argo.virtocommerce.cloud'
270326 matrix : ' {"include":${{ needs.ci.outputs.matrix }}}'
271- secrets : inherit
327+ secrets : inherit
0 commit comments