diff options
-rw-r--r-- | .coveragerc | 8 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | .travis.yml | 34 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | tox.ini | 37 |
5 files changed, 65 insertions, 20 deletions
diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..b96b3fc --- /dev/null +++ b/.coveragerc @@ -0,0 +1,8 @@ +[run] +branch = True +include = google_compute_engine/* + +[report] +exclude_lines = + pragma: no cover + if __name__ == .__main__.: @@ -2,6 +2,10 @@ *.pyo .DS_Store .idea +.cache +.tox +.coverage +*.egg-info # emacs backup files *.*~ diff --git a/.travis.yml b/.travis.yml index dfd5f8e..95a76a7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,29 +1,23 @@ language: python sudo: true python: - - 2.6 - - 2.7 - - 3.2 - - 3.3 - - 3.4 - - 3.5 - - pypy - - pypy3 -# Global configs cause unit tests to break. -# Issue: travis-ci/travis-ci#5246 -env: - - BOTO_CONFIG=/tmp/fake +- 2.6 +- 2.7 +- 3.2 +- 3.3 +- 3.4 +- 3.5 +- pypy +- pypy3 os: - - linux -# Python 2.6 uses a backported version of unittest. -# Python 3.2 does not have mock installed by default. +- linux install: - - pip install boto - - if [[ $TRAVIS_PYTHON_VERSION == 2.6 ]]; then pip install unittest2; fi - - if [[ $TRAVIS_PYTHON_VERSION == 3.2 ]]; then pip3.2 install mock; fi -# nosetests will run all tests within the current directory. +# Python 3.2 is only supported by an older version of virtualenv/pip. +- if [[ $TRAVIS_PYTHON_VERSION == '3.2' ]]; then pip install "virtualenv<14.0.0"; fi +- if [[ $TRAVIS_PYTHON_VERSION != '3.2' ]]; then pip install --upgrade virtualenv pip; fi +- pip install tox tox-travis script: - - nosetests +- tox deploy: provider: pypi @@ -1,5 +1,7 @@ ## Linux Guest Environment for Google Compute Engine +[![Build Status](https://travis-ci.org/GoogleCloudPlatform/compute-image-packages.svg?branch=master)](https://travis-ci.org/GoogleCloudPlatform/compute-image-packages) + This repository stores the collection of packages installed on Google supported Compute Engine [images](https://cloud.google.com/compute/docs/images). @@ -0,0 +1,37 @@ +[tox] +envlist = py26,py27,py32,py33,py34,py35,pypy,pypy3 + +[testenv] +deps = + pytest + pytest-cov + mock + unittest2 +commands = + py.test \ + -v \ + --cov \ + --cov-config=.coveragerc \ + {posargs:.} +setenv = + # Global configs cause unit tests to break. + # Issue: travis-ci/travis-ci#5246 + BOTO_CONFIG=/tmp/fake + +[testenv:py32] +# Coverage doesn't support py32, so run the tests without coverage reporting. +deps = + pytest + mock +commands = + py.test \ + -v \ + {posargs:.} + +# Note: currently disabled. +[testenv:lint] +deps = + flake8 + flake8-import-order +commands = + flake8 --exclude=env --import-order-style=google |