【发布时间】:2019-11-27 10:25:59
【问题描述】:
我想在 Linux 下的 Appveyor 上运行我的 python 项目的测试。
1。在不安装的情况下运行 tox(失败)
我试过不安装tox。 Here is the appveyor.yml:
# appveyor.yml
---
image:
- Ubuntu
build: off
test_script:
- tox
My build fails。它说:
/opt/appveyor/build-agent/bash-shell.sh: line 62: tox: command not found
2。安装 tox(失败)
好的,我们先安装tox...Here is my new appveyor.yml,它基于this guide。 (我刚刚添加了 Ubuntu 映像。)
# appveyor.yml
---
environment:
matrix:
- TOXENV: py36
image:
- Ubuntu
build: off
install:
- pip install tox
test_script:
- tox
但是,又是build fails。它说:
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/pyparsing.py'
如何在 Ubuntu 下的 Appveyor 上运行 tox?
【问题讨论】:
-
试试
pip install tox --user -
然而有许多变通方法可以在 Appveyor 上的 Linux 下运行测试,众所周知 Appveyor 是一个 Windows 中心。最后我将我的测试迁移到travis,现在它通过了。但是问题仍然悬而未决,因为 travis 不支持 Windows 100%,所以我想在 Win 和 Linux 上运行我的测试。
-
我在 Travis 运行 Linux 测试,在 AppVeyor 运行 w32 测试。对于免费软件项目,Travis 赠送了更多免费资源!
标签: python linux ubuntu appveyor tox