Skip to content

Commit

Permalink
Merge pull request #119 from mwarkentin/travis-pypi-deploys-test
Browse files Browse the repository at this point in the history
Travis updates
  • Loading branch information
mwarkentin authored Mar 5, 2018
2 parents dc104b4 + 9b1b9bf commit 9c420a0
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 11 deletions.
29 changes: 22 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@ sudo: false
language: python

python:
- "2.7"
- "3.4"
- "3.6"
- "3.5"
- "2.7"

env:
matrix:
- DJANGO_VERSION=1.7
- DJANGO_VERSION=1.8
- DJANGO_VERSION=1.9
- DJANGO_VERSION=2.0
- DJANGO_VERSION=1.11
- DJANGO_VERSION=1.10
- DJANGO_VERSION=1.9
- DJANGO_VERSION=1.8

matrix:
exclude:
- python: "3.5"
env: DJANGO_VERSION=1.7
- python: "2.7"
env: DJANGO_VERSION=2.0

install:
- pip install tox coveralls
Expand All @@ -30,3 +31,17 @@ after_success: coveralls

notifications:
slack: tobalabs:XPt5OlsKuFGgIQZp0DpNXBUl

jobs:
include:
- stage: pypi release
python: "3.6"
script: echo "Deploying to pypi ..."
deploy:
provider: pypi
user: mwarkentin
password:
secure: "cQtAP8fMu+KzfBKG3ibTTXmDGZuz/FBp8RrLI8ddMGV4Jj5ElZLsvbqU43fiHbtVPV/uALDPF76WNGlpRH1P4w9m4XrFNCvkrnjtwIk7NZWi7uubWZcqQk9VE7MTP+i2IYrtNlGmlq1dbdJZcwS0mdzJcAAhAaP830Ekmqws9xE="
distributions: "sdist bdist_wheel"
on:
tags: true
23 changes: 23 additions & 0 deletions RELEASING.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
=========
Releasing
=========

Releases are created via Travis or uploaded locally using `twine <https://github.com/pypa/twine]>`_.

When the release is ready to go:

* Make sure ``HISTORY.rst`` and other documentation is up to date
* Bump version in ``watchman/__init__.py``
* Tag code: ``git tag 1.0.0``
* Push tag: ``git push origin 1.0.0``

Travis will run the full test suite and deploy to pypi in a separate stage if everything passes.

Local fallback
~~~~~~~~~~~~~~

If Travis isn't available or working for releases for some reason, you can use `twine <https://github.com/pypa/twine]>`_ to upload the release.

* Install and configure `twine <https://github.com/pypa/twine]>`_
* Check dist locally: ``make dist``
* Deploy release: ``make release``
9 changes: 5 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
[tox]
envlist =
covclean,
py{27,34}-dj{17,18,19,110},
py35-dj{18,19,110},
py27-dj{18,19,110,111},
py{35,36}-dj{18,19,110,111,20},
coverage

[testenv]
setenv =
PYTHONPATH = {toxinidir}:{toxinidir}/watchman
commands = coverage run --parallel --source watchman runtests.py {posargs}
deps =
dj17: Django>=1.7,<1.8
dj18: Django>=1.8,<1.9
dj19: Django>=1.9,<1.10
dj110: Django==1.10rc1
dj110: Django>=1.10,<1.11
dj111: Django>=1.11,<2.0
dj20: Django>=2.0,<2.1
-r{toxinidir}/requirements-test.txt

[testenv:covclean]
Expand Down

0 comments on commit 9c420a0

Please sign in to comment.