edge-selenium-tools/azure-pipelines.yml

87 строки
2.2 KiB
YAML

pool:
vmImage: 'windows-latest'
steps:
- task: NuGetToolInstaller@1
inputs:
versionSpec:
- powershell: |
$SeleniumWebDriver = "selenium-dotnet-strongnamed-3.141.0"
$SeleniumWebDriverZip = "$SeleniumWebDriver.zip"
$SeleniumWebDriverDownloadUrl = "http://selenium-release.storage.googleapis.com/3.141/$SeleniumWebDriverZip"
$OutFile = "$env:PIPELINE_WORKSPACE/$SeleniumWebDriverZip"
Invoke-WebRequest $SeleniumWebDriverDownloadUrl -OutFile $OutFile
Expand-Archive $OutFile -DestinationPath "$env:PIPELINE_WORKSPACE/$SeleniumWebDriver"
displayName: download Selenium WebDriver strong-named package
- task: NuGetCommand@2
inputs:
command: 'restore'
restoreSolution: '**/*.sln'
feedsToUse: 'config'
nugetConfigPath: 'dotnet/nuget.config'
- task: VSBuild@1
inputs:
solution: '**\*.sln'
platform: 'any cpu'
configuration: 'release'
- task: VSTest@2
inputs:
testSelector: 'testAssemblies'
testAssemblyVer2: |
**\*test*.dll
!**\*TestAdapter.dll
!**\obj\**
searchFolder: '$(System.DefaultWorkingDirectory)'
- task: CopyFiles@2
inputs:
sourceFolder: 'dotnet\Microsoft.Edge.SeleniumTools\bin\Release'
contents: '*.nupkg'
targetFolder: '$(Build.ArtifactStagingDirectory)\dotnet'
- task: CopyFiles@2
inputs:
sourceFolder: 'dotnet\Microsoft.Edge.SeleniumTools.StrongNamed\bin\Release'
contents: '*.nupkg'
targetFolder: '$(Build.ArtifactStagingDirectory)\dotnet-strongnamed'
- script: |
python -m pip install --upgrade pip setuptools wheel
workingDirectory: 'py'
displayName: 'Install python dependencies'
- script: |
python setup.py sdist bdist_wheel
workingDirectory: 'py'
displayName: 'Create python package'
- task: CopyFiles@2
inputs:
sourceFolder: 'py\dist'
contents: |
*.tar.gz
*.whl
targetFolder: '$(Build.ArtifactStagingDirectory)\py'
- task: Npm@1
inputs:
command: 'custom'
customCommand: 'pack'
workingDir: 'js'
- task: CopyFiles@2
inputs:
sourceFolder: 'js'
contents: |
*.tgz
targetFolder: '$(Build.ArtifactStagingDirectory)\js'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'dist'
publishLocation: 'Container'