1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
# This pipeline is triggered only for pr
trigger: none
pr:
branches:
include:
- master
- feature/*
- hotfix/*
- release/*
- restapi*
paths:
include:
- sdk/core/
variables:
NodeVersion: '10.x'
PythonVersion: '3.6'
auto_rest_clone_url: 'https://github.com/Azure/autorest.python.git'
repo_branch: 'autorestv3'
source_path_azure_core: 'sdk/core/azure-core'
source_path_azure_mgmt_core: 'sdk/core/azure-mgmt-core'
jobs:
- job: 'Run_AutoRest'
displayName: 'Run AutoRest'
pool:
vmImage: 'ubuntu-18.04'
steps:
- task: NodeTool@0
displayName: 'Install Node.js $(NodeVersion)'
inputs:
versionSpec: '$(NodeVersion)'
- task: UsePythonVersion@0
displayName: 'Use Python $(PythonVersion)'
inputs:
versionSpec: $(PythonVersion)
- script: |
pip install -r eng/autorest_req.txt
git clone $(auto_rest_clone_url)
cd autorest.python
git checkout $(repo_branch)
npm install
displayName: 'Prepare Environment'
- script: |
cd $(Build.SourcesDirectory)/autorest.python/test/vanilla
pip install $(Build.SourcesDirectory)/$(source_path_azure_core)
pip install -r requirements.txt
pip freeze
pytest $(Build.SourcesDirectory)/autorest.python/test/vanilla
displayName: 'Install azure-core and Test Vanilla'
- script: |
cd $(Build.SourcesDirectory)/autorest.python/test/azure
pip install $(Build.SourcesDirectory)/$(source_path_azure_mgmt_core)
pip install -r requirements.txt
pip freeze
pytest $(Build.SourcesDirectory)/autorest.python/test/azure
displayName: 'Install azure-mgmt-core and Test Azure'
|