simple_ado/azure-pipelines.yml

71 строка
1.9 KiB
YAML
Исходник Обычный вид История

2019-07-17 14:04:49 +03:00
jobs:
- job: 'Test'
pool: 'Hosted macOS'
strategy:
matrix:
Python36:
python.version: '3.6'
Python37:
python.version: '3.7'
Python38:
python.version: '3.8'
Python39:
python.version: '3.9'
2019-07-17 14:04:49 +03:00
maxParallel: 4
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
architecture: 'x64'
- script: curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
displayName: Install Poetry
- script: python -m venv $(System.DefaultWorkingDirectory)
displayName: Create virtual environment
- script: |
source bin/activate
$HOME/.poetry/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'
- script: |
source bin/activate
python -m pytest tests --cov=simple_ado --cov-report html --cov-report xml --doctest-modules --junitxml=junit/test-results.xml
2019-07-23 18:48:11 +03:00
env:
SIMPLE_ADO_BASE_TOKEN: $(SIMPLE_ADO_BASE_TOKEN)
2019-07-17 14:04:49 +03:00
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