* fix_ci

Co-authored-by: Iurchenko Sergei
This commit is contained in:
Sergei Iurchenko 2023-03-11 17:58:13 +03:00 committed by GitHub
parent 79fd8af0f4
commit b486056802
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 33 additions and 46 deletions

View file

@ -11,12 +11,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8
@ -26,7 +26,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: release-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/tox.ini') }}

View file

@ -9,13 +9,13 @@ jobs:
fail-fast: false
max-parallel: 5
matrix:
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', 'pypy-3.8']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', 'pypy-3.8']
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
@ -25,7 +25,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key:
@ -36,13 +36,13 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade tox tox-gh-actions
python -m pip install --upgrade 'tox<4' tox-gh-actions
- name: Tox tests
run: |
tox -v
- name: Upload coverage
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
name: Python ${{ matrix.python-version }}

View file

@ -7,6 +7,8 @@ v3.0.0 (future)
* Refactor database backend
Backward incompatible changes:
remove 'constance.backends.database' from INSTALLED_APPS
* Dropped support for python < 3.7 and django < 3.2
* Example app now supports django 4.1
v2.10.0 (unreleased)
~~~~~~~~~~~~~~~~~~

View file

@ -1,13 +1,11 @@
"""
Django settings for cheeseshop project.
Generated by 'django-admin startproject' using Django 1.8.14.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
https://docs.djangoproject.com/en/4.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
https://docs.djangoproject.com/en/4.1/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
@ -18,7 +16,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
# See https://docs.djangoproject.com/en/4.1/howto/deployment/checklist/
SITE_ID = 1
@ -76,7 +74,7 @@ WSGI_APPLICATION = 'cheeseshop.wsgi.application'
# Database
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
# https://docs.djangoproject.com/en/4.1/ref/settings/#databases
DATABASES = {
'default': {
@ -124,14 +122,14 @@ CONSTANCE_BACKEND = 'constance.backends.database.DatabaseBackend'
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
'LOCATION': '127.0.0.1:11211',
}
}
CONSTANCE_DATABASE_CACHE_BACKEND = 'default'
# Internationalization
# https://docs.djangoproject.com/en/1.8/topics/i18n/
# https://docs.djangoproject.com/en/4.1/topics/i18n/
LANGUAGE_CODE = 'en-us'
@ -145,7 +143,7 @@ USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.8/howto/static-files/
# https://docs.djangoproject.com/en/4.1/howto/static-files/
STATIC_URL = '/static/'

View file

@ -1,14 +1,13 @@
from django.conf.urls import url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.contrib import admin
from django.conf import settings
from django.urls import path
from django.urls import re_path
admin.autodiscover()
urlpatterns = [
path('admin/', admin.site.urls),
re_path('admin/', admin.site.urls),
]
if settings.DEBUG:

View file

@ -1,12 +1,3 @@
"""
WSGI config for cheeseshop project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application

View file

@ -1,2 +1,2 @@
Django>=2.2
python-memcached
Django>=3.2
pymemcache

View file

@ -34,9 +34,6 @@ setup(
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Framework :: Django',
'Framework :: Django :: 2.2',
'Framework :: Django :: 3.0',
'Framework :: Django :: 3.1',
'Framework :: Django :: 3.2',
'Framework :: Django :: 4.0',
'Framework :: Django :: 4.1',
@ -46,11 +43,11 @@ setup(
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
@ -59,7 +56,7 @@ setup(
packages=find_packages(exclude=['tests', 'tests.*']),
include_package_data=True,
zip_safe=False,
python_requires='>=3.6',
python_requires='>=3.7',
install_requires=[
'django-picklefield',
],

View file

18
tox.ini
View file

@ -1,20 +1,20 @@
[tox]
requires =
tox<4
envlist =
py{36,37,38,39,py3}-dj{22,30,31,32}-{unittest,pytest}
py{38,39,310}-dj{40,41,main}-{unittest,pytest}
py310-dj32-{unittest,pytest}
py{37,38,39,310,py3}-dj{32}-{unittest,pytest}
py{38,39,310}-dj{40}-{unittest,pytest}
py{38,39,310,311}-dj{41}-{unittest,pytest}
py{310,311}-dj{main}-{unittest,pytest}
[testenv]
deps =
redis
coverage
django-picklefield
dj22: Django>=2.2,<3.0
dj30: Django>=3.0,<3.1
dj31: Django>=3.1,<3.2
dj32: Django>=3.2,<4
dj40: Django>=4.0,<4.1
dj41: Django>=4.1b1,<4.2
dj41: Django>=4.1,<4.2
djmain: https://github.com/django/django/archive/main.tar.gz
pytest: pytest
pytest: pytest-cov
@ -33,9 +33,9 @@ setenv =
[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38
3.9: py39
3.10: py310
3.11: py311
pypy-3: pypy3