From c63c776811959bc8662c80218b31923c1fc5263a Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 9 Oct 2017 15:31:57 +0300 Subject: [PATCH 01/10] Unify Travis CI config style + indentation --- .travis.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index ee9d7aa..fac6684 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,13 @@ sudo: false language: python python: - - "2.7" - - "3.4" - - "3.5" - - "3.6" +- 2.7 +- 3.4 +- 3.5 +- 3.6 install: - - if [[ $TRAVIS_PYTHON_VERSION == 3.5 || $TRAVIS_PYTHON_VERSION == 3.6 ]]; then pip install aiohttp==2.0.6 asynctest==0.10.0; fi - - pip install -q pep8==1.6.2 +- if [[ $TRAVIS_PYTHON_VERSION == 3.5 || $TRAVIS_PYTHON_VERSION == 3.6 ]]; then pip install aiohttp==2.0.6 asynctest==0.10.0; fi +- pip install -q pep8==1.6.2 script: - - pep8 . - - python setup.py test +- pep8 . +- python setup.py test From 1267520b256b14c72ee656dc7b8ddd2edb12f71a Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 9 Oct 2017 15:35:15 +0300 Subject: [PATCH 02/10] Move linting into separate stage in Travis CI --- .travis.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index fac6684..60f7e0a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,10 +4,24 @@ python: - 2.7 - 3.4 - 3.5 -- 3.6 +- &main_python_version 3.6 install: - if [[ $TRAVIS_PYTHON_VERSION == 3.5 || $TRAVIS_PYTHON_VERSION == 3.6 ]]; then pip install aiohttp==2.0.6 asynctest==0.10.0; fi -- pip install -q pep8==1.6.2 script: -- pep8 . - python setup.py test + +jobs: + fast_finish: true + + include: + - stage: &lint_stage_name lint + python: *main_python_version + install: + - pip install -q pep8==1.6.2 + script: + - pep8 . + +stages: +- *lint_stage_name +- test +- deploy From fd3bdd4f1e62832867805b5b20510930c21161d8 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 9 Oct 2017 15:38:02 +0300 Subject: [PATCH 03/10] Move async deps to test-requirements.txt --- .travis.yml | 2 -- test-requirements.txt | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 60f7e0a..c903d7f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,8 +5,6 @@ python: - 3.4 - 3.5 - &main_python_version 3.6 -install: -- if [[ $TRAVIS_PYTHON_VERSION == 3.5 || $TRAVIS_PYTHON_VERSION == 3.6 ]]; then pip install aiohttp==2.0.6 asynctest==0.10.0; fi script: - python setup.py test diff --git a/test-requirements.txt b/test-requirements.txt index 62ef78b..b97deea 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,3 +2,5 @@ nose mock flask<0.12 Django>=1.8,<1.11 +aiohttp==2.0.6; python_version>="3.5" +asynctest==0.10.0; python_version>="3.5" From 9fa986b03bb5daeb2fb9808e8daf065d85ab4906 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 9 Oct 2017 15:41:44 +0300 Subject: [PATCH 04/10] Bump tested aiohttp version --- test-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-requirements.txt b/test-requirements.txt index b97deea..3ca8e26 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,5 +2,5 @@ nose mock flask<0.12 Django>=1.8,<1.11 -aiohttp==2.0.6; python_version>="3.5" +aiohttp>=2.0,<2.3; python_version>="3.5" asynctest==0.10.0; python_version>="3.5" From cb23da059a15d0d496fe6c8e8c48ea088551ad56 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 9 Oct 2017 15:50:37 +0300 Subject: [PATCH 05/10] Add typical deployment stage template to Travis CI Resolves #40. @dbaxa just needs to add his encrypted password. Ref: https://docs.travis-ci.com/user/encryption-keys/ --- .travis.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c903d7f..feddc6d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,24 @@ jobs: script: - pep8 . + - stage: &deploy_stage_name deploy to PYPI (triggered only for tagged commits) + python: *main_python_version + script: skip + deploy: + provider: pypi + distribution: sdist bdist_wheel + user: dblack + password: + secure: YOUR_ENCRYPTED_PASSWORD_HERE_https://docs.travis-ci.com/user/encryption-keys/ + # Since commit https://github.com/travis-ci/dpl/commit/90b5e39 + # it is default that Travis PYPI provider has `skip_upload_docs: true` + # set by default. + on: + tags: true + all_branches: true + stages: - *lint_stage_name - test -- deploy +- name: *deploy_stage_name + if: tag IS present From 5ace6083f3713a4c4f2612dd4b5b7282cac02726 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 9 Oct 2017 15:58:21 +0300 Subject: [PATCH 06/10] Upgrade pip+setuptools to modern versions --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index feddc6d..ed94910 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,8 @@ python: - 3.4 - 3.5 - &main_python_version 3.6 +before_install: +- pip install -U pip setuptools script: - python setup.py test @@ -21,6 +23,7 @@ jobs: - stage: &deploy_stage_name deploy to PYPI (triggered only for tagged commits) python: *main_python_version + before_install: [] script: skip deploy: provider: pypi From 63e1c3e48aa9139e4e963671de492a8d98db1479 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 9 Oct 2017 16:21:34 +0300 Subject: [PATCH 07/10] Add caching of python distributions --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index ed94910..177dfb1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,6 @@ sudo: false +cache: + pip: true language: python python: - 2.7 From 14264de452736d9d99359bb7a5d484cbd8af71d4 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 9 Oct 2017 16:56:11 +0300 Subject: [PATCH 08/10] Bump pbr dependency to v3.1.1 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index c6e6cc7..0a0dd33 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( - setup_requires=['pbr==1.8.1'], + setup_requires=['pbr==3.1.1'], pbr=True, test_suite='nose.collector', platforms=['any'], From 475fd039969d0a42ced099eb1e1a30413bf461d9 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Tue, 10 Oct 2017 01:07:06 +0300 Subject: [PATCH 09/10] Add workaround for unsupprted env markers in test Commit openstack-dev/pbr@4b15038 claims that ``tests_require`` doesn't support env markers becauses of setuptools. --- .travis.yml | 2 ++ test-requirements-py3.txt | 2 ++ test-requirements.txt | 2 -- 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 test-requirements-py3.txt diff --git a/.travis.yml b/.travis.yml index 177dfb1..963d2cb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,8 @@ python: - &main_python_version 3.6 before_install: - pip install -U pip setuptools +install: +- pip install -r test-requirements-py3.txt script: - python setup.py test diff --git a/test-requirements-py3.txt b/test-requirements-py3.txt new file mode 100644 index 0000000..44883dc --- /dev/null +++ b/test-requirements-py3.txt @@ -0,0 +1,2 @@ +aiohttp>=2.0,<2.3; python_version>="3.4" +asynctest==0.10.0; python_version>="3.4" diff --git a/test-requirements.txt b/test-requirements.txt index 3ca8e26..62ef78b 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,5 +2,3 @@ nose mock flask<0.12 Django>=1.8,<1.11 -aiohttp>=2.0,<2.3; python_version>="3.5" -asynctest==0.10.0; python_version>="3.5" From 84bb242dc5ae9f87cb2ed42bb83a4ae83f612465 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Tue, 10 Oct 2017 01:11:03 +0300 Subject: [PATCH 10/10] Do not shut up ``pip install`` in Travis CI --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 963d2cb..79b05e2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,7 @@ jobs: - stage: &lint_stage_name lint python: *main_python_version install: - - pip install -q pep8==1.6.2 + - pip install pep8==1.6.2 script: - pep8 .