simple_ado/azure-pipelines.yml

73 строки
1.9 KiB
YAML

jobs:
- job: 'Test'
pool:
vmImage: 'macOS-latest'
strategy:
matrix:
Python38:
python.version: '3.8'
Python39:
python.version: '3.9'
Python310:
python.version: '3.10'
Python311:
python.version: '3.11'
maxParallel: 8
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
architecture: 'x64'
- script: curl -sSL https://install.python-poetry.org | python
displayName: Install Poetry
- script: python -m venv $(System.DefaultWorkingDirectory)
displayName: Create virtual environment
- script: |
source bin/activate
$HOME/.local/bin/poetry install
displayName: 'Install dependencies'
- script: |
source bin/activate
python -m pylint --rcfile=pylintrc simple_ado
python -m pylint --rcfile=pylintrc tests
displayName: 'Lint'
- script: |
source bin/activate
python -m mypy --ignore-missing-imports simple_ado/
python -m mypy --ignore-missing-imports tests/
displayName: 'Type Check'
# Disable for now until we set up a testable Azure DevOps instance
# - script: |
# source bin/activate
# python -m pytest tests --cov=simple_ado --cov-report html --cov-report xml --doctest-modules --junitxml=junit/test-results.xml
# env:
# SIMPLE_ADO_BASE_TOKEN: $(SIMPLE_ADO_BASE_TOKEN)
# displayName: 'pytest'
# - script: |
# source bin/activate
# python inlinecss.py htmlcov
# displayName: 'Inline CSS'
# - task: PublishTestResults@2
# inputs:
# testResultsFiles: '**/test-results.xml'
# testRunTitle: 'Python $(python.version)'
# condition: succeededOrFailed()
# # Publish Code Coverage Results
# - task: PublishCodeCoverageResults@1
# inputs:
# codeCoverageTool: 'cobertura'
# summaryFileLocation: $(System.DefaultWorkingDirectory)/coverage.xml
# reportDirectory: $(System.DefaultWorkingDirectory)/htmlcov