Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Travis CI build stages #68

Merged
merged 5 commits into from
Nov 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 26 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,35 @@ sudo: true

language: python
python:
- 2.7
- 3.4
- 3.5
- 3.6
- 3.7
- 2.7
- 3.4
- 3.5
- 3.6
- 3.7

env:
- DJANGO=1.11
- DJANGO=2.0
- DJANGO=2.1
- DJANGO=1.11
- DJANGO=2.0
- DJANGO=2.1

matrix:
exclude:
# Python/Django combinations that aren't officially supported
- { env: DJANGO=1.11, python: 3.7 }
- { env: DJANGO=2.0, python: 2.7 }
- { env: DJANGO=2.1, python: 2.7 }
- { env: DJANGO=2.1, python: 3.4 }
include:
- { env: TOXENV=flake8, python: 3.7 }
- { env: TOXENV=readme, python: 3.7 }
# Python/Django combinations that aren't officially supported
- { env: DJANGO=1.11, python: 3.7 }
- { env: DJANGO=2.0, python: 2.7 }
- { env: DJANGO=2.1, python: 2.7 }
- { env: DJANGO=2.1, python: 3.4 }

install:
- pip install tox-travis
- pip install tox-travis
script:
- tox
- tox

stages:
- lint
- test

jobs:
include:
- { stage: lint, python: 3.7, env: TOXENV=flake8 }
- { stage: lint, python: 3.7, env: TOXENV=readme }
3 changes: 0 additions & 3 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@ behave = "*"
Django = ">=1.11"

[dev-packages]
behave = "*"
flake8 = "*"
pytest = "*"
tox = "*"
Django = ">=1.11"
Sphinx = "*"

[requires]
python_version = "3.6"
150 changes: 73 additions & 77 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 2 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,9 @@ Version Support
---------------

behave-django is `tested against`_ the officially supported combinations of
Python and Django (Django 1.8, 1.9, 1.10, 1.11, 2.0 on Python 2.7, 3.3, 3.4,
3.5, 3.6, excluding the aged Python 3.2).
Python and Django (Django 1.11, 2.0, 2.1 on Python 2.7, 3.4, 3.5, 3.6, 3.7).

The version of `behave`_ is independent from our integration.

**Older versions:** Django versions 1.4 through 1.9 on Python 2.6 through 3.5
are supported until `version 0.3.0`_ of ``behave-django``. Please install
that release for Django 1.7.x and below. There is no technical disadvantage.
The version of `behave`_ is not tied our integration (read: "independent").

.. docs-marker

Expand All @@ -53,7 +48,6 @@ Please, read the `contributing guide`_ in the docs.

.. _tested against: https://travis-ci.org/behave/behave-django
.. _behave: https://pypi.python.org/pypi/behave
.. _version 0.3.0: https://pypi.python.org/pypi/behave-django/0.3.0
.. _behave-django.readthedocs.io: https://behave-django.readthedocs.io/en/latest/
.. _behave.readthedocs.io: https://behave.readthedocs.io/en/latest/usecase_django.html
.. _contributing guide: https://behave-django.readthedocs.io/en/latest/contribute.html
Expand Down
5 changes: 1 addition & 4 deletions tests/acceptance/steps/context-urlhelper.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
from behave import when, then
try:
from django.urls import reverse
except ImportError: # Django < 1.10
from django.core.urlresolvers import reverse
from django.urls import reverse

from test_app.models import BehaveTestModel

Expand Down
4 changes: 2 additions & 2 deletions tests/acceptance/steps/live_test_server.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
try:
from urllib2 import urlopen
except ImportError:
from urllib.request import urlopen
except ImportError: # Python 2
from urllib2 import urlopen

from behave import when, then

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_exit_codes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
try:
import unittest.mock as mock
from unittest import mock
except ImportError:
import mock

Expand Down
Loading