Skip to content

Commit

Permalink
add venv folder path
Browse files Browse the repository at this point in the history
  • Loading branch information
iscai-msft committed May 16, 2024
1 parent 04ada1a commit be564c3
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
10 changes: 10 additions & 0 deletions eng/pipelines/ci-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ parameters:
regenerate: false
checkChange: true
updateToLatestTypespec: false
venvFolderPath: ""

steps:
- checkout: self
Expand Down Expand Up @@ -80,6 +81,15 @@ steps:
displayName: List installed packages
workingDirectory: $(Build.SourcesDirectory)/autorest.python/packages/${{parameters.folderName}}

- script: |
python -m venv venv
if [[ "$(Agent.OS)" == "Windows_NT" ]]; then
venv\Scripts\activate
else
source venv/bin/activate
displayName: 'Create and activate virtual environment'
workingDirectory: $(Build.SourcesDirectory)/autorest.python/packages/${{parameters.folderName}}/{{parameter.venvFolderPath}}
- script: pylint ${{parameters.pythonFolderName}}
displayName: Pylint
workingDirectory: $(Build.SourcesDirectory)/autorest.python/packages/${{parameters.folderName}}
Expand Down
2 changes: 2 additions & 0 deletions eng/pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ jobs:
pythonCodeChecks: true
pythonFolderName: autorest
regenerate: true
venvFolderPath: "node_modules/pygen/venv"

- script: |
pip install pip
Expand Down Expand Up @@ -178,6 +179,7 @@ jobs:
installCadlRanch: true
folderName: "typespec-python"
regenerate: true
venvFolderPath: "dist/pygen/venv"

- template: generated-code-checks-template.yml
parameters:
Expand Down
1 change: 1 addition & 0 deletions eng/pipelines/internal-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ steps:
installCadlRanch: true
folderName: "typespec-python"
regenerate: true
venvFolderPath: "dist/pygen/venv"

- script: |
tox run -e ci
Expand Down
1 change: 1 addition & 0 deletions eng/pipelines/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ steps:
regenerate: true
updateToLatestTypespec: true
checkChange: false
venvFolderPath: "dist/pygen/venv"

- template: generated-code-checks-template.yml
parameters:
Expand Down

0 comments on commit be564c3

Please sign in to comment.