Skip to content

Commit

Permalink
Update build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Johnson committed Oct 12, 2021
1 parent 66bcb47 commit c10604a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
28 changes: 14 additions & 14 deletions build/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,48 +217,48 @@ stages:
inputs:
scriptType: inlineScript
inlineScript: >
@{ username = $env:Umbraco__CMS__Unattended__UnattendedUserEmail; password = $env:Umbraco__CMS__Unattended__UnattendedUserPassword } | ConvertTo-Json | Set-Content -Path "src\Umbraco.Tests.AcceptanceTest\cypress.env.json"
@{ username = $env:Umbraco__CMS__Unattended__UnattendedUserEmail; password = $env:Umbraco__CMS__Unattended__UnattendedUserPassword } | ConvertTo-Json | Set-Content -Path "tests\Umbraco.Tests.AcceptanceTest\cypress.env.json"
- task: Npm@1
name: PrepareTask
displayName: npm install (AcceptanceTest)
inputs:
workingDir: 'src\Umbraco.Tests.AcceptanceTest'
workingDir: 'tests\Umbraco.Tests.AcceptanceTest'
- task: Npm@1
displayName: Run Cypress (Desktop)
condition: always()
continueOnError: true
inputs:
workingDir: src\Umbraco.Tests.AcceptanceTest
workingDir: tests\Umbraco.Tests.AcceptanceTest
command: 'custom'
customCommand: 'run test -- --reporter junit --reporter-options "mochaFile=results/test-output-D-[hash].xml,toConsole=true" --config="viewportHeight=1600,viewportWidth=2560,screenshotsFolder=cypress/artifacts/desktop/screenshots,videosFolder=cypress/artifacts/desktop/videos,videoUploadOnPasses=false"'

- task: PublishTestResults@2
condition: always()
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: 'src/Umbraco.Tests.AcceptanceTest/results/test-output-D-*.xml'
testResultsFiles: 'tests/Umbraco.Tests.AcceptanceTest/results/test-output-D-*.xml'
mergeTestResults: true
testRunTitle: "Test results Desktop"
# - task: Npm@1
# displayName: Run Cypress (Tablet portrait)
# condition: always()
# inputs:
# workingDir: src\Umbraco.Tests.AcceptanceTest
# workingDir: tests\Umbraco.Tests.AcceptanceTest
# command: 'custom'
# customCommand: 'run test -- --config="viewportHeight=1366,viewportWidth=1024,screenshotsFolder=cypress/artifacts/tablet/screenshots,videosFolder=cypress/artifacts/tablet/videos,videoUploadOnPasses=false"'
#
# - task: Npm@1
# displayName: Run Cypress (Mobile protrait)
# condition: always()
# inputs:
# workingDir: src\Umbraco.Tests.AcceptanceTest
# workingDir: tests\Umbraco.Tests.AcceptanceTest
# command: 'custom'
# customCommand: 'run test -- --config="viewportHeight=812,viewportWidth=375,screenshotsFolder=cypress/artifacts/mobile/screenshots,videosFolder=cypress/artifacts/mobile/videos,videoUploadOnPasses=false"'
- task: PublishPipelineArtifact@1
displayName: "Publish test artifacts"
condition: failed()
inputs:
targetPath: '$(Build.SourcesDirectory)/src/Umbraco.Tests.AcceptanceTest/cypress/artifacts'
targetPath: '$(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/cypress/artifacts'
artifact: 'Test artifacts - Windows'
- job: Linux_Acceptance_tests
displayName: Linux
Expand Down Expand Up @@ -310,51 +310,51 @@ stages:
displayName: Generate Cypress.env.json
inputs:
targetType: 'inline'
script: 'echo "{ \"username\": \"$USERNAME\", \"password\": \"$PASSWORD\" }" > "src/Umbraco.Tests.AcceptanceTest/cypress.env.json"'
script: 'echo "{ \"username\": \"$USERNAME\", \"password\": \"$PASSWORD\" }" > "tests/Umbraco.Tests.AcceptanceTest/cypress.env.json"'
env:
USERNAME: $(Umbraco__CMS__Unattended__UnattendedUserEmail)
PASSWORD: $(Umbraco__CMS__Unattended__UnattendedUserPassword)
- task: Npm@1
name: PrepareTask
displayName: npm install (AcceptanceTest)
inputs:
workingDir: 'src/Umbraco.Tests.AcceptanceTest'
workingDir: 'tests/Umbraco.Tests.AcceptanceTest'
- task: Npm@1
displayName: Run Cypress (Desktop)
condition: always()
continueOnError: true
inputs:
workingDir: src/Umbraco.Tests.AcceptanceTest
workingDir: tests/Umbraco.Tests.AcceptanceTest
command: 'custom'
customCommand: 'run test -- --reporter junit --reporter-options "mochaFile=results/test-output-D-[hash].xml,toConsole=true" --config="viewportHeight=1600,viewportWidth=2560,screenshotsFolder=cypress/artifacts/desktop/screenshots,videosFolder=cypress/artifacts/desktop/videos,videoUploadOnPasses=false"'

- task: PublishTestResults@2
condition: always()
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: 'src/Umbraco.Tests.AcceptanceTest/results/test-output-D-*.xml'
testResultsFiles: 'tests/Umbraco.Tests.AcceptanceTest/results/test-output-D-*.xml'
mergeTestResults: true
testRunTitle: "Test results Desktop"
# - task: Npm@1
# displayName: Run Cypress (Tablet portrait)
# condition: always()
# inputs:
# workingDir: src/Umbraco.Tests.AcceptanceTest
# workingDir: tests/Umbraco.Tests.AcceptanceTest
# command: 'custom'
# customCommand: 'run test -- --config="viewportHeight=1366,viewportWidth=1024,screenshotsFolder=cypress/artifacts/tablet/screenshots,videosFolder=cypress/artifacts/tablet/videos,videoUploadOnPasses=false"'
#
# - task: Npm@1
# displayName: Run Cypress (Mobile protrait)
# condition: always()
# inputs:
# workingDir: src/Umbraco.Tests.AcceptanceTest
# workingDir: tests/Umbraco.Tests.AcceptanceTest
# command: 'custom'
# customCommand: 'run test -- --config="viewportHeight=812,viewportWidth=375,screenshotsFolder=cypress/artifacts/mobile/screenshots,videosFolder=cypress/artifacts/mobile/videos,videoUploadOnPasses=false"'
- task: PublishPipelineArtifact@1
displayName: "Publish test artifacts"
condition: failed()
inputs:
targetPath: '$(Build.SourcesDirectory)/src/Umbraco.Tests.AcceptanceTest/cypress/artifacts'
targetPath: '$(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/cypress/artifacts'
artifact: 'Test artifacts - Linux'
- stage: Artifacts
dependsOn: []
Expand Down
2 changes: 1 addition & 1 deletion build/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@

# beware of the weird double \\ at the end of paths
# see http://edgylogic.com/blog/powershell-and-external-commands-done-right/
&$this.BuildEnv.VisualStudio.MsBuild "$($this.SolutionRoot)\src\Umbraco.Tests\Umbraco.Tests.csproj" `
&$this.BuildEnv.VisualStudio.MsBuild "$($this.SolutionRoot)\tests\Umbraco.Tests\Umbraco.Tests.csproj" `
/p:WarningLevel=0 `
/p:Configuration=$buildConfiguration `
/p:Platform=AnyCPU `
Expand Down

0 comments on commit c10604a

Please sign in to comment.