TravicCI build dont find Managa.py[Django]命令

2024-10-02 22:23:21 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在学习一个教程和一个完全的新手。 在教程中,导师使用docker作为虚拟环境,因为我目前正在使用我的Win-10-Home机器,所以我决定使用普通的'olpython 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是因为它在app文件夹之外,所以我想

.travis.yaml

language: python
python:
 - 3.6

install:
 - pip install -r requirments.txt

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

link to the github project


Tags: installpippytestgitgithubapiapp
2条回答

试一试

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

因为您首先需要使用manage.py文件导航到应用程序

这是一个简单的语法问题 travis需要有关manage.py文件所在位置的帮助

解决方案:

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

相关问题 更多 >