2019-04-11 07:09:08 +03:00
|
|
|
parameters:
|
|
|
|
name: ''
|
|
|
|
vmImage: ''
|
|
|
|
targetBrowser: ''
|
|
|
|
xvfb: false
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
- job: ${{ parameters.name }}
|
|
|
|
displayName: ${{ parameters.displayName }}
|
|
|
|
pool:
|
|
|
|
vmImage: ${{ parameters.vmImage }}
|
|
|
|
variables:
|
|
|
|
TARGET_BROWSER: ${{ parameters.targetBrowser }}
|
|
|
|
dependsOn: Build
|
|
|
|
condition: succeeded()
|
|
|
|
steps:
|
|
|
|
- task: NodeTool@0
|
|
|
|
inputs:
|
|
|
|
versionSpec: '10.x'
|
|
|
|
displayName: 'Install Node.js'
|
|
|
|
- task: Npm@0
|
|
|
|
inputs:
|
|
|
|
command: install
|
|
|
|
- task: DownloadBuildArtifacts@0
|
|
|
|
displayName: 'Download library'
|
|
|
|
inputs:
|
|
|
|
artifactName: dist
|
|
|
|
downloadPath: $(System.DefaultWorkingDirectory)
|
|
|
|
- task: DownloadBuildArtifacts@0
|
|
|
|
displayName: 'Download testrunner'
|
|
|
|
inputs:
|
|
|
|
artifactName: build
|
|
|
|
downloadPath: $(System.DefaultWorkingDirectory)
|
2020-04-15 08:03:04 +03:00
|
|
|
- ${{ if ne(parameters.xcodeSelection, '') }}:
|
|
|
|
- script: sudo xcode-select -s "${{ parameters.xcodeSelection }}"
|
|
|
|
displayName: 'Switch Xcode'
|
2019-04-11 07:09:08 +03:00
|
|
|
- ${{ if not(eq(parameters.xvfb, 'true')) }}:
|
|
|
|
- script: npm run karma
|
|
|
|
displayName: 'Run browser tests'
|
|
|
|
- ${{ if eq(parameters.xvfb, 'true') }}:
|
|
|
|
- script: Xvfb :99 &
|
|
|
|
displayName: 'Start Xvfb'
|
|
|
|
- script: DISPLAY=:99 npm run karma
|
|
|
|
displayName: 'Run browser tests'
|
|
|
|
- task: PublishTestResults@2
|
|
|
|
condition: succeededOrFailed()
|
|
|
|
inputs:
|
|
|
|
testRunner: JUnit
|
|
|
|
testResultsFiles: 'tmp/junit/*.xml'
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: Upload Screenshots
|
|
|
|
condition: succeededOrFailed()
|
|
|
|
inputs:
|
|
|
|
PathtoPublish: 'tmp/reftests'
|
|
|
|
artifactName: ReftestResults
|