我正在学习一个教程和一个完整的新手。在本教程中,导师使用docker作为虚拟环境,因为我目前正在使用我的Win-10-Home机器,所以我决定使用普通的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 发布于 2020-03-29 22:50:06
试一试
$ cd app/ && python manage.py test && flake8因为您首先需要使用manage.py文件导航到app。
发布于 2020-03-29 22:51:04
事实证明这是一个简单的语法问题-- travis需要帮助才能知道manage.py文件的位置
解决方案:
script: - cd app/ && python manage.py test && flake8
https://stackoverflow.com/questions/60915297
复制相似问题