Skip to content

Commit

Permalink
Merge pull request #61 from gintas/django-3.2-upgrade
Browse files Browse the repository at this point in the history
Django 3.2 upgrade
  • Loading branch information
charettes committed Jun 18, 2022
2 parents c6e018e + e63ba79 commit 1dec9f4
Show file tree
Hide file tree
Showing 8 changed files with 93 additions and 67 deletions.
8 changes: 0 additions & 8 deletions .coveragerc

This file was deleted.

55 changes: 55 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Test

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 5
matrix:
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key:
${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/tox.ini') }}
restore-keys: |
${{ matrix.python-version }}-v1-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade tox tox-gh-actions
- name: Tox tests
run: |
tox -v
- name: Coveralls
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
flag-name: Unit Test

coveralls_finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: AndreMiras/coveralls-python-action@develop
with:
parallel-finished: true

39 changes: 0 additions & 39 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ django-picklefield
:target: https://pypi.python.org/pypi/django-picklefield/
:alt: Latest Version

.. image:: https://travis-ci.org/gintas/django-picklefield.svg?branch=master
:target: https://travis-ci.org/gintas/django-picklefield
.. image:: https://github.com/gintas/django-picklefield/workflows/Test/badge.svg?branch=master
:target: https://github.com/gintas/django-picklefield/actions
:alt: Build Status

.. image:: https://coveralls.io/repos/gintas/django-picklefield/badge.svg?branch=master
Expand Down
10 changes: 10 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,13 @@ combine_as_imports=true
include_trailing_comma=true
multi_line_output=5
not_skip=__init__.py

[coverage:run]
source = picklefield
branch = 1
relative_files = 1

[coverage:report]
exclude_lines =
pragma: no cover
except ImportError:
7 changes: 3 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Framework :: Django',
'Framework :: Django :: 2.2',
'Framework :: Django :: 3.0',
'Framework :: Django :: 3.2',
'Framework :: Django :: 4.0',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
Expand All @@ -36,7 +35,7 @@
keywords=['django pickle model field'],
packages=find_packages(exclude=['tests', 'tests.*']),
python_requires='>=3',
install_requires=['Django>=2.2'],
install_requires=['Django>=3.2'],
extras_require={
'tests': ['tox'],
},
Expand Down
3 changes: 3 additions & 0 deletions tests/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@
INSTALLED_APPS = [
'tests',
]

USE_TZ = False
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
34 changes: 20 additions & 14 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,38 @@ args_are_paths = false
envlist =
flake8,
isort,
py35-2.2,
py36-{2.2,3.0,master},
py37-{2.2,3.0,master},
py38-{2.2,3.0,master},
py36-3.2,
py37-3.2,
py38-{3.2,4.0,main},
py39-{3.2,4.0,main},
py310-{3.2,4.0,main},

[tox:travis]
3.5 = py35
3.6 = py36
3.7 = py37
3.8 = py38
[gh-actions]
python =
3.6: py36, flake8, isort
3.7: py37
3.8: py38
3.9: py39
3.10: py310

[testenv]
basepython =
py35: python3.5
py36: python3.6
py37: python3.7
py38: python3.8
py39: python3.9
py310: python3.10
usedevelop = true
commands =
{envpython} -R -Wonce {envbindir}/coverage run --branch -m django test -v2 --settings=tests.settings {posargs}
{envpython} -R -Wonce {envbindir}/coverage run -a -m django test -v2 --settings=tests.settings {posargs}
coverage report -m
deps =
coverage
2.2: Django>=2.2,<3.0
3.0: Django>=3.0,<3.1
master: https://github.com/django/django/archive/master.tar.gz
3.2: Django>=3.0,<3.1
4.0: Django>=4.0,<4.1
main: https://github.com/django/django/archive/main.tar.gz
passenv =
GITHUB_*

[testenv:flake8]
usedevelop = false
Expand Down

0 comments on commit 1dec9f4

Please sign in to comment.