File tree Expand file tree Collapse file tree 4 files changed +94
-0
lines changed Expand file tree Collapse file tree 4 files changed +94
-0
lines changed Original file line number Diff line number Diff line change 1+ language : python
2+
3+ python :
4+ - 2.7
5+
6+ install :
7+ - pip install codecov
8+
9+ script :
10+ - coverage run tests.py
11+
12+ after_success :
13+ - codecov
Original file line number Diff line number Diff line change 1+ Python Example
2+ =======
3+ | [ https://codecov.io/ ] [ 1 ] | [ @codecov ] [ 2 ] | [ hello@codecov.io ] [ 3 ] |
4+ | ------------------------ | ------------- | --------------------- |
5+
6+ > Example of how to integrate with [ Codecov.io] [ 1 ] for your ** awesome** Python project!
7+
8+ ## See this repos [ Coveage Reports] [ 4 ]
9+
10+
11+ ## Usage
12+
13+ ``` sh
14+ pip install codecov
15+ codecov --token=< repo token>
16+ ```
17+
18+ ## Require min coverage
19+ ``` sh
20+ codecov --min-coverage=75
21+ ```
22+ > if coverage is under ` 75 ` codecov will trigger your build to fail
23+
24+ # [ ![ travis-org] ( https://avatars2.githubusercontent.com/u/639823?v=2&s=50 )] ( https://travis-ci.org ) Travis C
25+ > Append to your ` .travis.yml `
26+
27+ ``` yml
28+ install :
29+ pip install codecov
30+ after_success :
31+ codecov
32+ ` ` `
33+
34+ > ### Start testing with [Travis](https://travis-ci.org/)
35+
36+ # [](https://codeship.io/) Codeship
37+ > Append to your ` Test Commands` *after* your test commands
38+
39+ ` ` ` sh
40+ pip install codecov
41+ codecov --token=<repo token>
42+ ` ` `
43+
44+ > # ## Start testing with [Codeship](https://codeship.io/)
45+
46+
47+ # [](https://circleci.com/) Circle CI
48+ > Append to your `circle.yml` file
49+
50+ ` ` ` yml
51+ test:
52+ post:
53+ - pip install codecov
54+ - codecov --token=<repo token>
55+ ` ` `
56+ > # ## Start testing with [Circle CI](https://circleci.com/)
57+
58+
59+
60+
61+ [1] : https://codecov.io/
62+ [2] : https://twitter.com/codecov
63+ [3] : mailto:hello@codecov.io
64+ [4] : https://codecov.io/github/codecov/example-python
Original file line number Diff line number Diff line change 1+ def smile ():
2+ return ":)"
3+
4+ def frown ():
5+ return ":("
Original file line number Diff line number Diff line change 1+ import unittest
2+
3+ import awesome
4+
5+
6+ class TestMethods (unittest .TestCase ):
7+ def test_add (self ):
8+ self .assertEqual (awesome .smile (), ":)" )
9+
10+
11+ if __name__ == '__main__' :
12+ unittest .main ()
You can’t perform that action at this time.
0 commit comments