-
Notifications
You must be signed in to change notification settings - Fork 3k
/
Copy pathautorest_checks.yml
63 lines (54 loc) · 1.88 KB
/
autorest_checks.yml
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
# This pipeline is triggered only for pr
trigger: none
pr:
branches:
include:
- main
- feature/*
- hotfix/*
- release/*
- restapi*
paths:
include:
- sdk/core/
variables:
NodeVersion: '18.x'
PythonVersion: '3.9'
auto_rest_clone_url: 'https://github.com/Azure/autorest.python.git'
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:
name: azsdk-pool
vmImage: 'ubuntu-22.04'
steps:
- task: NodeTool@0
displayName: 'Install Node.js $(NodeVersion)'
inputs:
versionSpec: '$(NodeVersion)'
- task: UsePythonVersion@0
displayName: 'Use Python $(PythonVersion)'
inputs:
versionSpec: $(PythonVersion)
- script: |
npm install -g pnpm
git clone $(auto_rest_clone_url)
cd autorest.python
pnpm install
displayName: 'Prepare Environment'
- script: |
cd $(Build.SourcesDirectory)/autorest.python/packages/autorest.python/test/vanilla/legacy
python -m pip install $(Build.SourcesDirectory)/$(source_path_azure_core)
python -m pip install -r requirements.txt
pip freeze
pytest $(Build.SourcesDirectory)/autorest.python/packages/autorest.python/test/vanilla/legacy
displayName: 'Install azure-core and Test Vanilla Legacy'
- script: |
cd $(Build.SourcesDirectory)/autorest.python/packages/autorest.python/test/azure/legacy
python -m pip install $(Build.SourcesDirectory)/$(source_path_azure_mgmt_core)
python -m pip install -r requirements.txt
pip freeze
pytest $(Build.SourcesDirectory)/autorest.python/packages/autorest.python/test/azure/legacy
displayName: 'Install azure-mgmt-core and Test Azure Legacy'