From 9c1fcbbb15caf6f5c306ce34a748704ea87aa933 Mon Sep 17 00:00:00 2001 From: tsv2013 Date: Wed, 10 Jul 2024 18:43:16 +0300 Subject: [PATCH] Update devops-visual-regression-tests.yml for Azure Pipelines --- devops-visual-regression-tests.yml | 130 ++++++++++++++--------------- 1 file changed, 65 insertions(+), 65 deletions(-) diff --git a/devops-visual-regression-tests.yml b/devops-visual-regression-tests.yml index 1f3331d3b8..d2af33553c 100644 --- a/devops-visual-regression-tests.yml +++ b/devops-visual-regression-tests.yml @@ -439,69 +439,69 @@ jobs: condition: always() displayName: 'publish vrt artifacts' -# - job: SurveyUI -# steps: -# - checkout: self - -# - task: PowerShell@2 -# displayName: 'update Google Chrome to latest' -# inputs: -# targetType: 'inline' -# script: '$Path = $env:TEMP; $Installer = ''chrome_installer.exe''; Invoke-WebRequest -Uri ''http://dl.google.com/chrome/install/375.126/chrome_installer.exe'' -OutFile $Path\$Installer; Start-Process -FilePath $Path\$Installer -Args ''/silent /install'' -Verb RunAs -Wait; Remove-Item -Path $Path\$Installer' - -# - task: NodeTool@0 -# inputs: -# versionSpec: '14.x' -# displayName: 'Install Node.js' - -# - task: CopyFiles@2 -# inputs: -# SourceFolder: "$(Build.SourcesDirectory)/" -# Contents: "package.json" -# TargetFolder: "$(Build.SourcesDirectory)/Temp/" -# OverWrite: true -# displayName: "Copy package.json for cache key" -# - task: Cache@2 -# inputs: -# key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json' -# path: $(Build.SourcesDirectory)/node_modules -# cacheHitVar: NPM_CACHE_RESTORED -# displayName: Cache NPM - -# - task: Npm@1 -# displayName: 'NPM install' -# inputs: -# command: install -# verbose: false -# condition: ne(variables.NPM_CACHE_RESTORED, 'true') - -# - script: | -# npm run build_core -# npm run build_i18n -# npm run build-plugins -# displayName: "Build Core" - -# - script: | -# npm run build_ui_prod -# displayName: "Build survey-ui" - -# - script: | -# npm run vrt:survey-ui:ci -# displayName: "Visual Regression Tests" - -# - task: CopyFiles@2 -# inputs: -# SourceFolder: '$(Build.SourcesDirectory)/visualRegressionTests' -# Contents: '**' -# TargetFolder: '$(Build.ArtifactStagingDirectory)/Library_SurveyUI_VRT' -# OverWrite: true -# condition: always() -# displayName: 'copy vrt artifacts' +- job: SurveyUI + steps: + - checkout: self + + - task: PowerShell@2 + displayName: 'update Google Chrome to latest' + inputs: + targetType: 'inline' + script: '$Path = $env:TEMP; $Installer = ''chrome_installer.exe''; Invoke-WebRequest -Uri ''http://dl.google.com/chrome/install/375.126/chrome_installer.exe'' -OutFile $Path\$Installer; Start-Process -FilePath $Path\$Installer -Args ''/silent /install'' -Verb RunAs -Wait; Remove-Item -Path $Path\$Installer' + + - task: NodeTool@0 + inputs: + versionSpec: '14.x' + displayName: 'Install Node.js' + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/" + Contents: "package.json" + TargetFolder: "$(Build.SourcesDirectory)/Temp/" + OverWrite: true + displayName: "Copy package.json for cache key" + - task: Cache@2 + inputs: + key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json' + path: $(Build.SourcesDirectory)/node_modules + cacheHitVar: NPM_CACHE_RESTORED + displayName: Cache NPM + + - task: Npm@1 + displayName: 'NPM install' + inputs: + command: install + verbose: false + condition: ne(variables.NPM_CACHE_RESTORED, 'true') + + - script: | + npm run build_core + npm run build_i18n + npm run build-plugins + displayName: "Build Core" + + - script: | + npm run build_ui_prod + displayName: "Build survey-ui" + + - script: | + npm run vrt:survey-ui:ci + displayName: "Visual Regression Tests" + + - task: CopyFiles@2 + inputs: + SourceFolder: '$(Build.SourcesDirectory)/visualRegressionTests' + Contents: '**' + TargetFolder: '$(Build.ArtifactStagingDirectory)/Library_SurveyUI_VRT' + OverWrite: true + condition: always() + displayName: 'copy vrt artifacts' -# - task: PublishBuildArtifacts@1 -# inputs: -# PathtoPublish: '$(Build.ArtifactStagingDirectory)/Library_SurveyUI_VRT/' -# ArtifactName: 'Library_JqueryUI_VRT' -# publishLocation: 'Container' -# condition: always() -# displayName: 'publish vrt artifacts' + - task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)/Library_SurveyUI_VRT/' + ArtifactName: 'Library_JqueryUI_VRT' + publishLocation: 'Container' + condition: always() + displayName: 'publish vrt artifacts'