From 39083ca21d5ac6d864999b880d4e24a297f2cea5 Mon Sep 17 00:00:00 2001 From: Aarni Koskela Date: Mon, 9 May 2022 15:05:49 +0300 Subject: [PATCH] Switch to GitHub Actions CI + drop support for old Python/Django Fixes #130 --- .github/workflows/ci.yml | 30 ++++++++++++++++++++++++++++++ .travis.yml | 36 ------------------------------------ pyproject.toml | 12 +++++++----- tox.ini | 19 ++++++++++++++----- 4 files changed, 51 insertions(+), 46 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..89bb3e5 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,30 @@ +name: CI +on: + push: + branches: + - fork + - master + pull_request: + branches: + - fork + - master +jobs: + Build: + runs-on: ubuntu-20.04 + strategy: + matrix: + include: + - python-version: '3.8' + - python-version: '3.9' + - python-version: '3.10' + - python-version: '3.11' + steps: + - uses: actions/checkout@v2 + - name: 'Set up Python ${{ matrix.python-version }}' + uses: actions/setup-python@v4 + with: + python-version: '${{ matrix.python-version }}' + cache: pip + cache-dependency-path: pyproject.toml + - run: pip install -U pip wheel setuptools tox tox-gh + - run: tox diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 91a40f4..0000000 --- a/.travis.yml +++ /dev/null @@ -1,36 +0,0 @@ -sudo: false -language: python -dist: xenial -matrix: - include: - - python: '3.6' - env: TOXENV=py36-django22 - - python: '3.7' - env: TOXENV=py37-django22 - - python: '3.8' - env: TOXENV=py38-django22 - - python: '3.9' - env: TOXENV=py39-django22 - - - python: '3.6' - env: TOXENV=py36-django30 - - python: '3.7' - env: TOXENV=py37-django30 - - python: '3.8' - env: TOXENV=py38-django30 - - python: '3.9' - env: TOXENV=py39-django30 - - - python: '3.6' - env: TOXENV=py36-django31 - - python: '3.7' - env: TOXENV=py37-django31 - - python: '3.8' - env: TOXENV=py38-django31 - - python: '3.9' - env: TOXENV=py39-django31 - -install: - - pip install -U pip wheel setuptools - - pip install tox -script: tox diff --git a/pyproject.toml b/pyproject.toml index f6bedac..1fe197e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,21 +17,23 @@ maintainers = [ classifiers = [ "Environment :: Web Environment", "Framework :: Django", - "Framework :: Django :: 2.2", - "Framework :: Django :: 3.0", - "Framework :: Django :: 3.1", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", - "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", "Topic :: Internet :: WWW/HTTP", ] +requires-python = ">=3.7" + +dependencies = [ + "django>=3.2", +] [project.urls] Homepage = "https://github.com/hzdg/django-enumfields" diff --git a/tox.ini b/tox.ini index 08373f0..673b3d7 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,7 @@ [tox] envlist = - py{36,37,38,39}-django{22,30,31} + py{38,39}-django{32} + py{39,310,311}-django{40,41} [testenv] setenv = PYTHONPATH = {toxinidir} @@ -8,7 +9,15 @@ commands = py.test -s tests --cov=enumfields --cov-report=term-missing deps = djangorestframework>=3.7 pytest-django - pytest-coverage - django22: Django>=2.2,<2.3 - django30: Django>=3.0,<3.1 - django31: Django>=3.1,<3.2 + pytest-cov + django32: Django~=3.2.0 + django40: Django~=4.0.0 + django41: Django~=4.1.0 + django42: Django~=4.2.0 + +[gh] +python = + 3.8: py38 + 3.9: py39 + 3.10: py310 + 3.11: py311