【发布时间】:2020-04-28 06:11:52
【问题描述】:
我正在关注https://docs.microsoft.com/en-us/azure/devops/pipelines/ecosystems/python?view=azure-devops 的教程。
这是我的 azure-pipelines.yml 文件:
# Python package
# Create and test a Python package on multiple Python versions.
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/python
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
strategy:
matrix:
Python27:
python.version: '2.7'
Python35:
python.version: '3.5'
Python36:
python.version: '3.6'
Python37:
python.version: '3.7'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'
- script: |
python -m pip install --upgrade pip
pip install -r requirements.txt
displayName: 'Install dependencies'
- script: |
pip install pytest pytest-azurepipelines
pytest
displayName: 'pytest'
运行管道失败并显示以下错误消息。
Bash 以代码“5”退出。
我启用了系统诊断以将调试消息添加到日志中。
完整日志可在https://github.com/michaelhochleitner/debug-azure-devops-python-pipeline/blob/master/log.txt 获得。
我怎样才能使管道运行而不失败?
【问题讨论】:
-
pytest报告收集了 0 个项目。
标签: python git azure azure-devops azure-pipelines