Skip to content
This repository was archived by the owner on Apr 20, 2023. It is now read-only.

Commit 097f692

Browse files
committed
add shippable and remove min-cov example
1 parent 9edb4a9 commit 097f692

File tree

4 files changed

+26
-3
lines changed

4 files changed

+26
-3
lines changed

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ codecov --token=<repo token>
1313

1414
## Require min coverage
1515
```sh
16-
codecov --min-coverage=75
16+
codecov
1717
```
18-
> if coverage is under `75` codecov will trigger your build to fail
1918

2019
# [![travis-org](https://avatars2.githubusercontent.com/u/639823?v=2&s=50)](https://travis-ci.org) Travis C
2120
> Append to your `.travis.yml`

codecov/__init__.py

+13
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,19 @@ def main(*argv):
201201
owner=os.getenv('WERCKER_GIT_OWNER'),
202202
repo=os.getenv('WERCKER_GIT_REPOSITORY'),
203203
commit=os.getenv('WERCKER_GIT_COMMIT')))
204+
# ---------
205+
# Shippable
206+
# ---------
207+
elif os.getenv('SHIPPABLE') == "true":
208+
# http://docs.shippable.com/en/latest/config.html#common-environment-variables
209+
defaults.update(dict(branch=os.getenv('BRANCH'),
210+
service='shippable',
211+
build=os.getenv('BUILD_NUMBER'),
212+
build_url=os.getenv('BUILD_URL'),
213+
pull_request=os.getenv('PULL_REQUEST') if os.getenv('PULL_REQUEST')!='false' else '',
214+
owner=os.getenv('REPO_NAME').split('/',1)[0],
215+
repo=os.getenv('REPO_NAME').split('/',1)[1],
216+
commit=os.getenv('COMMIT')))
204217
# ---
205218
# git
206219
# ---

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
setup(name='codecov',
1818
version=version,
19-
description="Hosted coverage reports for Github and Bitbucket",
19+
description="Hosted coverage reports for @github, @bitbucket and @gitlab",
2020
long_description=None,
2121
classifiers=classifiers,
2222
keywords='coverage codecov code python java scala php',

tests/test.py

+11
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,17 @@ def test_ci_drone(self):
167167
CODECOV_TOKEN=self.upload_token)
168168
self.passed(self.command())
169169

170+
def test_ci_shippable(self):
171+
self.set_env(SHIPPABLE="true",
172+
BUILD_NUMBER="10",
173+
PULL_REQUEST="1",
174+
REPO_NAME='codecov/ci-repo',
175+
BRANCH="master",
176+
BUILD_URL="https://shippable.com/...",
177+
COMMIT="743b04806ea677403aa2ff26c6bdeb85005de658",
178+
CODECOV_TOKEN=self.upload_token)
179+
self.passed(self.command())
180+
170181
def test_ci_appveyor(self):
171182
self.set_env(APPVEYOR='True',
172183
CI='True',

0 commit comments

Comments
 (0)