File tree 3 files changed +30
-1
lines changed
3 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -60,4 +60,6 @@ rm -rf htmlcov
60
60
rm -rf tmp
61
61
coverage html --include=shadowsocks/*
62
62
63
+ coverage report --include=shadowsocks/* | tail -n1 | rev | cut -d' ' -f 1 | rev > /tmp/shadowsocks-coverage
64
+
63
65
exit $result
Original file line number Diff line number Diff line change 1
1
shadowsocks
2
2
===========
3
3
4
- [ ![ PyPI version]] [ PyPI ] [ ![ Build Status]] [ Travis CI ]
4
+ [ ![ PyPI version]] [ PyPI ]
5
+ [ ![ Build Status]] [ Travis CI ]
6
+ [ ![ Coverage Status]] [ Coverage ]
5
7
6
8
A fast tunnel proxy that helps you bypass firewalls.
7
9
@@ -119,6 +121,8 @@ Bugs and Issues
119
121
[ Android ] : https://github.com/clowwindy/shadowsocks/wiki/Ports-and-Clients#android
120
122
[ Build Status ] : https://img.shields.io/travis/clowwindy/shadowsocks/master.svg?style=flat
121
123
[ Chinese Readme ] : https://github.com/clowwindy/shadowsocks/wiki/Shadowsocks-%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E
124
+ [ Coverage Status ] : http://192.81.132.184/result/shadowsocks
125
+ [ Coverage ] : http://192.81.132.184/job/Shadowsocks/ws/htmlcov/index.html
122
126
[ Debian sid ] : https://packages.debian.org/unstable/python/shadowsocks
123
127
[ the package ] : https://pypi.python.org/pypi/shadowsocks
124
128
[ Encryption ] : https://github.com/clowwindy/shadowsocks/wiki/Encryption
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env python
2
+
3
+ import tornado .ioloop
4
+ import tornado .web
5
+ import urllib
6
+
7
+
8
+ class MainHandler (tornado .web .RequestHandler ):
9
+ def get (self ):
10
+ with open ('/tmp/shadowsocks-coverage' , 'rb' ) as f :
11
+ coverage = f .read ().strip ()
12
+ self .redirect (('https://img.shields.io/badge/'
13
+ 'coverage-%s-brightgreen.svg'
14
+ '?style=flat' ) %
15
+ urllib .quote (coverage ))
16
+
17
+ application = tornado .web .Application ([
18
+ (r"/shadowsocks" , MainHandler ),
19
+ ])
20
+
21
+ if __name__ == "__main__" :
22
+ application .listen (8888 , address = '127.0.0.1' )
23
+ tornado .ioloop .IOLoop .instance ().start ()
You can’t perform that action at this time.
0 commit comments