Files
presidio/.pipelines/templates/lint-build-test.yml
Sharon Hart cb0184afa2 Add Ruff linter + Apply Ruff fix (#1379)
* Add Ruff linter + Apply Ruff fix

* Move up linting

* Move up linting

* Move up linting

* docs

* docs
2024-05-12 10:16:47 +03:00

138 lines
4.4 KiB
YAML

stages:
- stage: LintBuildTest
displayName: Presidio Build
jobs:
- job: SecurityAnalysis
displayName: Security Analysis
pool:
# CredScan only runs on Windows
vmImage: 'windows-latest'
steps:
- template: ./security-analysis.yml
- job: Linting
displayName: Linting
pool:
vmImage: 'ubuntu-latest'
steps:
- task: Bash@3
displayName: 'Linting: Presidio for $(python.version)'
inputs:
targetType: 'inline'
script: |
set -eux # fail on error
pip install ruff
ruff check
- job: TestAnalyzer
displayName: Test Analyzer
pool:
vmImage: 'ubuntu-latest'
strategy:
matrix:
Python38:
python.version: '3.8'
Python39:
python.version: '3.9'
Python310:
python.version: '3.10'
Python311:
python.version: '3.11'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'
- template: ./build-analyzer.yml
- job: TestAnonymizer
displayName: Test Anonymizer
pool:
vmImage: 'ubuntu-latest'
strategy:
matrix:
Python38:
python.version: '3.8'
Python39:
python.version: '3.9'
Python310:
python.version: '3.10'
Python311:
python.version: '3.11'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'
- template: ./build-anonymizer.yml
- job: TestImageRedactor
displayName: Test Image Redactor
pool:
vmImage: 'ubuntu-latest'
strategy:
matrix:
Python38:
python.version: '3.8'
Python39:
python.version: '3.9'
Python310:
python.version: '3.10'
Python311:
python.version: '3.11'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'
- template: ./build-image-redactor.yml
- job: TestCli
displayName: Test Cli
pool:
vmImage: 'ubuntu-latest'
strategy:
matrix:
Python38:
python.version: '3.8'
Python39:
python.version: '3.9'
Python310:
python.version: '3.10'
Python311:
python.version: '3.11'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'
- template: ./build-cli.yml
- job: TestStructured
displayName: Test Presidio Structured
pool:
vmImage: 'ubuntu-latest'
strategy:
matrix:
Python38:
python.version: '3.8'
Python39:
python.version: '3.9'
Python310:
python.version: '3.10'
Python311:
python.version: '3.11'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'
- template: ./build-structured.yml