diff --git a/eng/pipelines/autorest_checks.yml b/eng/pipelines/autorest_checks.yml new file mode 100644 index 000000000000..e1546ec8bcf8 --- /dev/null +++ b/eng/pipelines/autorest_checks.yml @@ -0,0 +1,47 @@ +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: 'azure-core' + source_path: 'sdk/core/azure-core' + +jobs: + - job: 'Run_AutoRest' + displayName: 'Run AutoRest' + + pool: + vmImage: 'ubuntu-16.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 pytest pytest-cov pytest-asyncio isodate msrest aiohttp $(Build.SourcesDirectory)/$(source_path) + displayName: 'Prepare Environment' + + - script: | + git clone --recursive $(auto_rest_clone_url) + cd autorest.python + git checkout $(repo_branch) + npm install + pytest test/vanilla + displayName: 'Run Test' \ No newline at end of file