Skip to content

Commit

Permalink
Merge pull request #166 from jazzband/fix-failing-tests
Browse files Browse the repository at this point in the history
Updates Test Configuration, Narrows Dependency Declaration
  • Loading branch information
iMerica committed Nov 11, 2020
2 parents dad5bca + 7ce1a47 commit 817d0af
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 34 deletions.
41 changes: 20 additions & 21 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,44 @@ orbs:
docker: circleci/docker@0.6.0

jobs:
test-django-3: &template
test:
docker:
- image: circleci/python:3.8.0
environment:
DJANGO_VERSION: 3.1
DRF: 3.11.1
executor: docker/docker
steps:
- checkout
- run:
command: pip install --user Django==$DJANGO_VERSION djangorestframework==$DRF
name: "Pip install version-specific Django + DRF"
command: pip install --user tox coverage coveralls
name: "Install Tox & Coverage"
- run:
command: pip install --user -r dj_rest_auth/tests/requirements.pip
name: "Pip Install test requirements"
command: tox
name: "Run Tox on All Supported Django and Python Versions"
- run:
command: |
mkdir -p test-results/
coverage run --source=dj_rest_auth setup.py test
coverage report
name: Test
tox -e coverage
name: "Generate Coverage Report"
- run:
command: COVERALLS_REPO_TOKEN=Q58WdUuZOi89XHyDeDsGE2lxUGQ2IfqP3 coveralls
name: Coverage
name: "Send results to Coveralls"
- store_test_results:
path: test-results/
build:
docker:
- image: circleci/python:3.8.0
executor: docker/docker
steps:
- checkout
- run:
command: python3 setup.py sdist
name: Build
- store_test_results:
path: test-results/
- store_artifacts:
path: dist/
test-django-2:
<<: *template
environment:
DJANGO_VERSION: 2.2.10
DRF: 3.9

workflows:
main:
jobs:
- test-django-3
- test-django-2
- test
- build:
requires:
- test
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Drop-in API endpoints for handling authentication securely in Django Rest Framew
with SPAs (e.g React, Vue, Angular), and Mobile applications.

## Requirements
- Django 2 or 3.
- Django 2 or 3 (<3.1)
- Python 3

## Quick Setup
Expand Down
2 changes: 1 addition & 1 deletion dj_rest_auth/__version__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
__title__ = 'dj-rest-auth'
__description__ = 'Authentication and Registration in Django Rest Framework.'
__url__ = 'http://github.com/jazzband/dj-rest-auth'
__version__ = '1.1.2'
__version__ = '2.0.0'
__author__ = '@iMerica https://github.com/iMerica'
__author_email__ = 'imichael@pm.me'
__license__ = 'MIT'
Expand Down
8 changes: 4 additions & 4 deletions dj_rest_auth/tests/requirements.pip
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
django-allauth>=0.25.0
responses>=0.5.0
django-allauth==0.42.0
responses==0.10.0
flake8==2.4.0
djangorestframework-simplejwt==4.4.0
unittest-xml-reporting>=3.0.2
coveralls>=1.11.1
unittest-xml-reporting==3.0.2
coveralls==1.11.1
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@
keywords='django rest auth registration rest-framework django-registration api',
zip_safe=False,
install_requires=[
'Django>=2.0',
'Django>=2.0,<3.1',
'djangorestframework>=3.7.0',
],
extras_require={
'with_social': ['django-allauth>=0.25.0'],
'with_social': ['django-allauth>=0.40.0,<0.43.0'],
},
tests_require=[
'unittest-xml-reporting>=3.0.2',
'responses>=0.5.0',
'django-allauth>=0.25.0',
'django-allauth==0.40.0',
'djangorestframework-simplejwt>=4.4.0 ',
'coveralls>=1.11.1'
],
Expand Down
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
[tox]
skipsdist = true
envlist =
python{3.5,3.6,3.7,3.8}-django22
python{3.6,3.7,3.8}-django31
python{3.5,3.6,3.7,3.8,3.9}-django2
python{3.6,3.7,3.8,3.9}-django3

[testenv]
commands =
python ./runtests.py
deps =
-rdj_rest_auth/tests/requirements.pip
django22: Django>=2.2,<2.3
django31: Django>=3.1
django2: Django>=2.2,<2.3
django3: Django>=3.0,<3.1

# Configuration for coverage and flake8 is being set in `./setup.cfg`
[testenv:coverage]
Expand Down

0 comments on commit 817d0af

Please sign in to comment.