我想在Windows和Ubuntu上测试我的python项目。幸运的是Appveyor从几个月以来就支持这两个系统。
- PYTHON: "C:\\Python36"
- PYTHON: "C:\\Python36-x64"
PYTHON
变量将作业数增加一倍,我让Ubuntu作业运行两次,而不是只运行一次(而且,从不使用此变量)
python
appveyor.yml
要修复:
version: build{build}
branches:
only:
- master
- pre-release
- dev
image:
- Visual Studio 2015
- Ubuntu1804
max_jobs: 1
environment:
matrix:
# For Python versions available on Appveyor, see
# https://www.appveyor.com/docs/windows-images-software/#python
# https://www.appveyor.com/docs/linux-images-software#python
- PYTHON: "C:\\Python36"
- PYTHON: "C:\\Python36-x64"
install:
# We need wheel installed to build wheels
- cmd: "%PYTHON%\\python.exe -m pip install wheel pytest"
- sh: "pip install wheel pytest"
build: off
test_script:
# Note that you must use the environment variable %PYTHON% to refer to
# the interpreter you're using - Appveyor does not do anything special
# to put the Python version you want to use on PATH.
- cmd: "%PYTHON%\\python.exe setup.py test"
- sh: "python setup.py test"
for:
或
exclude
那么,有没有办法继续运行两个Windows作业和一个Ubuntu作业呢?
(作为一种解决方法,我可能会删除32位python测试,但这并不是一个真正令人满意的技巧)。