mirror of
https://github.com/tgbot-collection/YYeTsBot.git
synced 2025-11-25 11:29:38 +08:00
travis-ci and coverage
This commit is contained in:
13
.gitattributes
vendored
13
.gitattributes
vendored
@@ -1,14 +1,7 @@
|
|||||||
worker/public/css/* linguist-vendored
|
worker/public/css/* linguist-vendored
|
||||||
worker/public/fonts/* linguist-vendored
|
worker/public/fonts/* linguist-vendored
|
||||||
worker/public/img/* linguist-vendored
|
worker/public/img/* linguist-vendored
|
||||||
|
worker/public/js/* linguist-vendored
|
||||||
|
|
||||||
worker/public/js/aYin.js linguist-vendored
|
worker/*.html linguist-vendored
|
||||||
worker/public/js/bootstrap.min.js linguist-vendored
|
tests/data/* linguist-vendored
|
||||||
worker/public/js/rrshare.js linguist-vendored
|
|
||||||
worker/public/js/vue.js linguist-vendored
|
|
||||||
worker/public/js/jquery* linguist-vendored
|
|
||||||
|
|
||||||
worker/public/404.html linguist-vendored
|
|
||||||
worker/public/index.html linguist-vendored
|
|
||||||
worker/public/resource.html linguist-vendored
|
|
||||||
worker/public/search.html linguist-vendored
|
|
||||||
12
.travis.yml
12
.travis.yml
@@ -1,17 +1,21 @@
|
|||||||
language: python
|
language: python
|
||||||
|
|
||||||
|
sudo: false
|
||||||
services:
|
services:
|
||||||
- redis
|
- redis
|
||||||
|
|
||||||
python:
|
python:
|
||||||
- "3.7"
|
|
||||||
- "3.8"
|
- "3.8"
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- pip install -r requirements.txt
|
- pip install -r requirements.txt
|
||||||
|
|
||||||
env:
|
env:
|
||||||
- REDIS=locahost
|
- REDIS=localhost
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- cd tests && python /build_test.py
|
- cd tests
|
||||||
- python tests/turing_test.py
|
- coverage run test_fansub.py
|
||||||
|
|
||||||
|
after_success:
|
||||||
|
- bash <(curl -s https://codecov.io/bash)
|
||||||
@@ -1,5 +1,9 @@
|
|||||||
# YYeTsBot
|
# YYeTsBot
|
||||||
|
|
||||||
|
[](https://travis-ci.com/tgbot-collection/YYeTsBot)
|
||||||
|
|
||||||
|
[](https://codecov.io/gh/tgbot-collection/YYeTsBot)
|
||||||
|
|
||||||
人人影视bot,[戳我使用](https://t.me/yyets_bot)
|
人人影视bot,[戳我使用](https://t.me/yyets_bot)
|
||||||
|
|
||||||
此机器人长期维护,如果遇到问题可以发送报告给我。
|
此机器人长期维护,如果遇到问题可以发送报告给我。
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import requests_mock
|
|||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
|
||||||
sys.path.append("../yyetsbot")
|
sys.path.append("../yyetsbot")
|
||||||
|
import bot as _
|
||||||
|
|
||||||
from fansub import BaseFansub, YYeTsOnline
|
from fansub import BaseFansub, YYeTsOnline
|
||||||
|
|
||||||
@@ -64,7 +65,7 @@ class YYeTsTest(unittest.TestCase):
|
|||||||
|
|
||||||
@requests_mock.mock()
|
@requests_mock.mock()
|
||||||
def test_get_search_html(self, m):
|
def test_get_search_html(self, m):
|
||||||
with open("yyets_search.html") as f:
|
with open("data/yyets_search.html") as f:
|
||||||
html = f.read()
|
html = f.read()
|
||||||
m.get('http://www.rrys2020.com/search?keyword=abc&type=resource', text=html)
|
m.get('http://www.rrys2020.com/search?keyword=abc&type=resource', text=html)
|
||||||
response = self.ins.__get_search_html__("abc")
|
response = self.ins.__get_search_html__("abc")
|
||||||
|
|||||||
@@ -53,5 +53,5 @@
|
|||||||
src="img/200-wrangler-ferris.gif">
|
src="img/200-wrangler-ferris.gif">
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
<script src="js/search.js"></script>
|
<script src="custom/search.js"></script>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
<h2>有问题请联系 <a style="text-decoration: none;color: green" href="https://t.me/BennyThink">Benny小可爱</a></h2>
|
<h2>有问题请联系 <a style="text-decoration: none;color: green" href="https://t.me/BennyThink">Benny小可爱</a></h2>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
<script src="js/search.js"></script>
|
<script src="custom/search.js"></script>
|
||||||
<script>
|
<script>
|
||||||
let kwe = document.URL.split("kw=")[1];
|
let kwe = document.URL.split("kw=")[1];
|
||||||
let kw = decodeURI(kwe).toLowerCase().replace(" ", "");
|
let kw = decodeURI(kwe).toLowerCase().replace(" ", "");
|
||||||
|
|||||||
Reference in New Issue
Block a user