我按照 https://learn.microsoft.com/en-us/azure/devops/pipelines/ecosystems/python?view=azure-devops#3-customize-your-pipeline 创建了一个 azure 管道
我使用了官方链接中提到的相同脚本,如下所示
- script: |
pip install pytest pytest-azurepipelines
pytest
displayName: 'pytest'
运行我的 python 脚本、构建和发布工件后,管道在此步骤失败并出现以下错误。
*Error:*
**
============================= test session starts ==============================
platform linux -- Python 3.12.3, pytest-8.2.2, pluggy-1.5.0
rootdir: /home/vsts/work/1/s
plugins: anyio-4.4.0, azurepipelines-1.0.5, nunit-1.0.7
collected 0 items
Result Attachments will be stored in LogStore
Run Attachments will be stored in LogStore
No Result Found to Publish '/home/vsts/work/1/s/test-output.xml'.
Skipping uploading of coverage data.
-------- generated Nunit xml file: /home/vsts/work/1/s/test-output.xml ---------
============================ no tests ran in 0.01s =============================
##[error]Bash exited with code '5'.
Async Command Start: Publish test results
Async Command End: Publish test results
Finishing: pytest**
你能帮我解决问题吗?
- script: |
pip install pytest pytest-azurepipelines
pytest
displayName: 'pytest'