Skip to content

Commit

Permalink
test py 3.7, 3.8, drop django 1.4 add 2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
anentropic committed Sep 18, 2020
1 parent 9034be8 commit 497722b
Show file tree
Hide file tree
Showing 9 changed files with 168 additions and 196 deletions.
62 changes: 60 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- run:
command: |
. venv/bin/activate
tox -e py27-dj14-cel3,py27-dj14-cel4,py27-dj111-cel3,py27-dj111-cel4
tox -e py27-dj111-cel3,py27-dj111-cel4
- store_artifacts:
path: /tmp/results
destination: python-2.7
Expand Down Expand Up @@ -52,14 +52,72 @@ jobs:
- run:
command: |
. venv/bin/activate
tox -e py36-dj111-cel3,py36-dj111-cel4
tox -e py36-dj111-cel3,py36-dj111-cel4,py36-dj22-cel3,py36-dj22-cel4
- store_artifacts:
path: /tmp/results
destination: python-3.6

"python-3.7":
docker:
- image: circleci/python:3.7
environment:
- EVENT_CONSUMER_APP_CONFIG: test_app.settings
- BROKER_HOST: localhost
- image: circleci/rabbitmq:3.6.6
steps:
- checkout
- restore_cache:
key: py37-{{ .Branch }}-{{ checksum "requirements-base.txt" }}-{{ checksum "tox.ini" }}
- run:
command: |
python -m venv venv
. venv/bin/activate
pip install tox
- save_cache:
key: py37-{{ .Branch }}-{{ checksum "requirements-base.txt" }}-{{ checksum "tox.ini" }}
paths:
- "venv"
- run:
command: |
. venv/bin/activate
tox -e py37-dj22-cel3,py37-dj22-cel4
- store_artifacts:
path: /tmp/results
destination: python-3.7

"python-3.8":
docker:
- image: circleci/python:3.8
environment:
- EVENT_CONSUMER_APP_CONFIG: test_app.settings
- BROKER_HOST: localhost
- image: circleci/rabbitmq:3.6.6
steps:
- checkout
- restore_cache:
key: py38-{{ .Branch }}-{{ checksum "requirements-base.txt" }}-{{ checksum "tox.ini" }}
- run:
command: |
python -m venv venv
. venv/bin/activate
pip install tox
- save_cache:
key: py38-{{ .Branch }}-{{ checksum "requirements-base.txt" }}-{{ checksum "tox.ini" }}
paths:
- "venv"
- run:
command: |
. venv/bin/activate
tox -e py38-dj22-cel3,py38-dj22-cel4
- store_artifacts:
path: /tmp/results
destination: python-3.8

workflows:
version: 2
build:
jobs:
- "python-2.7"
- "python-3.6"
- "python-3.7"
- "python-3.8"
8 changes: 5 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,12 @@ This must be enabled if required via the ``settings.USE_DJANGO`` flag.
This project is tested against:

=========== ============ ============= ================== ==================
x Django 1.4 Django 1.11 Celery/Kombu 3.x Celery/Kombu 4.x
x Django 1.11 Django 2.2 Celery/Kombu 3.x Celery/Kombu 4.x
=========== ============ ============= ================== ==================
Python 2.7 * * * *
Python 3.6 * * *
Python 2.7 * * *
Python 3.6 * * * *
Python 3.7 * * *
Python 3.8 * * *
=========== ============ ============= ================== ==================

Running the tests
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
],
install_requires=[
'flexisettings>=1.0,<1.1',
'typing>=3.6.2,<4.0',
'typing>=3.6.2,<4.0; python_version < "3.6"',
'six',
],

Expand Down
161 changes: 0 additions & 161 deletions test_app/dj14/settings.py

This file was deleted.

17 changes: 0 additions & 17 deletions test_app/dj14/urls.py

This file was deleted.

File renamed without changes.
86 changes: 86 additions & 0 deletions test_app/dj22/settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
"""
Django settings for dj17_testproject project.
For more information on this file, see
https://docs.djangoproject.com/en/dev/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/dev/ref/settings/
"""

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(__file__)

MANAGE_PY_PATH = os.path.join(BASE_DIR, 'manage.py')


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/dev/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '#+*qjewrm$8o_)uxz6boz+gqp*pztxa84_41$fd8xbi!72$&2)'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

TEMPLATE_DEBUG = True

ALLOWED_HOSTS = []


# Application definition

INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'test_app',
)

MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
)

ROOT_URLCONF = 'test_app.dj22.urls'


# Database
# https://docs.djangoproject.com/en/dev/ref/settings/#databases

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
'TEST': {
'NAME': os.path.join(BASE_DIR, 'test_db.sqlite3'),
}
}
}

# Internationalization
# https://docs.djangoproject.com/en/dev/topics/i18n/

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_L10N = True

USE_TZ = True


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/dev/howto/static-files/

STATIC_URL = '/static/'
7 changes: 7 additions & 0 deletions test_app/dj22/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from django.conf.urls import patterns, include, url

urlpatterns = patterns('',
# Examples:
# url(r'^$', 'dj17_testproject.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
)
Loading

0 comments on commit 497722b

Please sign in to comment.