TravicCI版本未找到Managa.py [Django]命令

问题描述 投票:1回答:1

我正在学习教程和完整的新手。在本教程中,导师使用docker作为虚拟环境,并且因为我当前正在使用Win-10-Home机器,所以我决定使用普通的'ol python venv

由于某种原因TravicCI没有遵守我的manage.py命令,我不知道为什么!

这是TCI日志

0.58s$ git clone --depth=50 --branch=master https://github.com/therealgenish/recipe-app-api.git  therealgenish/recipe-app-api
$ source ~/virtualenv/python3.6/bin/activate
$ python --version
Python 3.6.7
$ pip --version
  pip 19.0.3 from /home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/pip (python 3.6)
  install
$ pip install -r requirments.txt
$ app\manage.py test && flake8
appmanage.py: command not found
The command "app\manage.py test && flake8" exited with 127.
Done. Your build exited with 1.

它是app\manage.py而不是manage.py的原因是因为它在应用程序文件夹之外,所以我想出来了。

.travis.yaml

language: python
python:
 - 3.6

install:
 - pip install -r requirments.txt

script:
 - app\manage.py test && flake8 

link to the github project

python django travis-ci
1个回答
0
投票

尝试

$ cd app/ && python manage.py test && flake8

因为首先需要导航到manage.py文件的路径。


0
投票

原来是一个简单的语法问题-travis需要manage.py文件的位置的帮助

解决方案:

script: - cd app/ && python manage.py test && flake8

© www.soinside.com 2019 - 2024. All rights reserved.