Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add vulnerability scan to official build #267

Merged
merged 19 commits into from
Dec 4, 2024
21 changes: 0 additions & 21 deletions eng/templates/build.yml

This file was deleted.

29 changes: 0 additions & 29 deletions eng/templates/ci-tests.yml

This file was deleted.

27 changes: 25 additions & 2 deletions eng/templates/jobs/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,38 @@ jobs:
- job: "Build"
displayName: 'Build Python SDK'

strategy:
matrix:
Python37:
PYTHON_VERSION: '3.7'
Python38:
PYTHON_VERSION: '3.8'
Python39:
PYTHON_VERSION: '3.9'
Python310:
PYTHON_VERSION: '3.10'
Python311:
PYTHON_VERSION: '3.11'
Python312:
PYTHON_VERSION: '3.12'

steps:
- task: UsePythonVersion@0
inputs:
versionSpec: "3.11"
versionSpec: $(PYTHON_VERSION)
- bash: |
python --version
displayName: 'Check python version'
- bash: |
python -m pip install -U pip
python -m pip install build
if [[ $(PYTHON_VERSION) == "3.7" ]]; then
python -m pip install importlib_metadata
fi
python -m build
displayName: 'Build Python SDK'
displayName: 'Build Python SDK for $(PYTHON_VERSION)'
- bash: |
pip install pip-audit
pip-audit .
displayName: 'Run vulnerability scan'
condition: ne(variables['PYTHON_VERSION'], '3.7')
4 changes: 4 additions & 0 deletions eng/templates/official/jobs/build-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ jobs:
python -m pip install build
python -m build
displayName: 'Build Python SDK'
- bash: |
pip install pip-audit
pip-audit .
displayName: 'Run vulnerability scan'
Loading