8000 codecov, deploy git tags to pypi with travis (#572) · ransa001/pvlib-python@d051264 · GitHub
[go: up one dir, main page]

Skip to content

Commit d051264

Browse files
authored
codecov, deploy git tags to pypi with travis (pvlib#572)
* add codecov to .travis.yml * add pypi deploy key to travis * add .codecov.yml, add deploy * remove bad yml * add coveragerc * change deploy env condition * add codecov badge
1 parent 6c6685a commit d051264

File tree

4 files changed

+55
-1
lines changed

4 files changed

+55
-1
lines changed

.codecov.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
codecov:
2+
notify:
3+
require_ci_to_pass: no
4+
5+
coverage:
6+
status:
7+
patch:
8+
default:
9+
target: '80'
10+
if_no_uploads: error
11+
if_not_found: success
12+
if_ci_failed: failure
13+
project:
14+
default: false
15+
library:
16+
target: auto
17+
if_no_uploads: error
18+
if_not_found: success
19+
if_ci_failed: failure
20+
paths:
21+
- "pvlib/(\w+/)?[^/]+\.py$"
22+
23+
tests:
24+
target: 100%
25+
paths:
26+
- "pvlib/tests/.*"
27+
28+
comment: off

.coveragerc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[run]
2+
omit = pvlib/_version.py

.travis.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# http://conda.pydata.org/docs/travis.html
33
# https://github.com/xray/xray/blob/master/.travis.yml
44
# https://github.com/scipy/scipy/blob/master/.travis.yml
5+
# https://github.com/Unidata/MetPy/blob/master/.travis.yml
56

67
language: python
78
sudo: false # if false, use TravisCI's container based build
@@ -19,7 +20,10 @@ matrix:
1920
- python: 3.5
2021
env: CONDA_ENV=py35
2122
- python: 3.6
22-
env: CONDA_ENV=py36
23+
env:
24+
- CONDA_ENV=py36
25+
- TASK="coverage"
26+
- DEPLOY_ENV="true"
2327
- python: 3.6
2428
env: CONDA_ENV=py37
2529

@@ -75,5 +79,24 @@ install:
7579
script:
7680
- pytest pvlib --cov=pvlib --cov-report term-missing
7781

82+
after_script:
83+
- if [[ $TASK == "coverage" ]]; then
84+
pip install codecov;
85+
codecov -e TRAVIS_PYTHON_VERSION;
86+
fi
87+
7888
after_success:
7989
coveralls
90+
91+
deploy:
92+
- provider: pypi
93+
user: wholmgren
94+
password:
95+
secure: cUaCm+/9BAZ7pn1e6+X1TBh4ysSW9dFnUHrYIcR8xefb/O5YVlzPZACt2pR0vYJuJ6vGWOK5VzigeKyh9dccIJUqntqsqNwQF3GkgcNNzIwDUKzsmbuKEgL1GCvJWaIvov0Sevfmg7eFpGbXdynw6IVFMBssz+eVCwEV5Ww8WbI=
96+
distributions: sdist bdist_wheel
97+
upload_docs: false
98+
on:
99+
repo: pvlib/pvlib-python
100+
python: 3.6
101+
condition: $DEPLOY_ENV == "true"
102+
tags: true

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ pvlib-python
44
[![TravisCI](https://travis-ci.org/pvlib/pvlib-python.svg?branch=master)](https://travis-ci.org/pvlib/pvlib-python)
55
[![Build status](https://ci.appveyor.com/api/projects/status/gr2eyhc84tvtkopk?svg=true)](https://ci.appveyor.com/project/wholmgren/pvlib-python-fv2to)
66
[![Coverage Status](https://img.shields.io/coveralls/pvlib/pvlib-python.svg)](https://coveralls.io/r/pvlib/pvlib-python)
7+
[![codecov](https://codecov.io/gh/pvlib/pvlib-python/branch/master/graph/badge.svg)](https://codecov.io/gh/pvlib/pvlib-python)
78
[![Documentation Status](https://readthedocs.org/projects/pvlib-python/badge/?version=latest)](http://pvlib-python.readthedocs.org/en/latest/)
89
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1246152.svg)](https://doi.org/10.5281/zenodo.1246152)
910
[![Code Health](https://landscape.io/github/pvlib/pvlib-python/master/landscape.svg?style=flat)](https://landscape.io/github/pvlib/pvlib-python/master)

0 commit comments

Comments
 (0)
0