构建在本地通过,但在Travis上失败

2024-05-15 02:16:24 发布

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

我现在正在学习Django课程(在线录制),我们使用Travis。我注意到我在Travis上的构建失败了,即使它们在本地通过

我试图查看讲师提供的不同文件,并将其与我的代码进行比较,但我找不到任何差异。老实说,这对我来说都很新鲜,所以我甚至不知道我应该在哪里寻找,或者我应该在这里粘贴哪部分代码来回答这个问题

这是Travis构建日志的结尾:

django.db.utils.OperationalError: could not connect to server: Connection refused
    Is the server running on host "db" (172.18.0.2) and accepting
    TCP/IP connections on port 5432?
The command "docker-compose run app sh -c "python manage.py test && flake8"" exited with 1.
Done. Your build exited with 1.

这是我的回购协议: https://github.com/Tsabary/recipe-app-api


Tags: 文件django代码travisappdbserver粘贴

热门问题