diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..363c49e --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,48 @@ +name: Tests + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + tests: + runs-on: ubuntu-22.04 + strategy: + max-parallel: 4 + matrix: + include: + - python: 3.11.11 + django: 5.2.0 + djangorestframework: 3.16.0 + - python: 3.11.11 + django: 4.1.13 + djangorestframework: 3.14.0 + - python: 3.9.16 + django: 3.2.17 + djangorestframework: 3.13.0 + - python: 3.7.15 + django: 2.2.28 + djangorestframework: 3.9.4 + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python }} + - name: Install Dependencies + run: >- + python -m pip + install --upgrade + pip + 'setuptools<58' + wheel + flake8 + 'Django==${{ matrix.django }}' + 'djangorestframework==${{ matrix.djangorestframework }}' + - name: Run Tests + run: | + ./runtests.sh diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 5341340..0000000 --- a/.travis.yml +++ /dev/null @@ -1,41 +0,0 @@ -language: python -python: 3.8 -dist: xenial -env: - global: - - DRF="djangorestframework==3.11.0" - - DJANGO="django==3.0.2" -matrix: - include: - - name: "Defaults (Python 3.8, Django 3.0, DRF 3.11)" - - name: "Python 3.7" - python: "3.7" - - name: "Python 3.6" - python: "3.6" - - name: "Django 2.2" - env: - - DJANGO="django==2.2.9" - - name: "Django 1.11" - env: - - DJANGO="django==1.11.27" - - name: "Python 3.5, Django 2.2" - python: "3.5" - env: - - DJANGO="django==2.2.9" - - name: "Python 3.4, Django 2.0, DRF 3.9" - python: "3.4" - env: - - DJANGO="django==2.0.13" - - DRF="djangorestframework==3.9.4" - - name: "Python 2.7, Django 1.8, DRF 3.6" - python: "2.7" - env: - - DJANGO="django==1.8.19" - - DRF="djangorestframework==3.6.4" - - name: "Code Lint" - env: - - LINT="flake8" -install: - - pip install $DJANGO $DRF $LINT -script: - - ./runtests.sh diff --git a/README.md b/README.md index 6e1de44..1201bc2 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,6 @@ A number of Pystache/Mustache backends for Django exist, though many are outdate [![GitHub Forks](https://img.shields.io/github/forks/wq/django-mustache.svg)](https://github.com/wq/django-mustache/network) [![GitHub Issues](https://img.shields.io/github/issues/wq/django-mustache.svg)](https://github.com/wq/django-mustache/issues) -[![Travis Build Status](https://img.shields.io/travis/wq/django-mustache/master.svg)](https://travis-ci.org/wq/django-mustache) [![Python Support](https://img.shields.io/pypi/pyversions/django-mustache.svg)](https://pypi.org/project/django-mustache) [![Django Support](https://img.shields.io/pypi/djversions/django-mustache.svg)](https://pypi.org/project/django-mustache) diff --git a/setup.py b/setup.py index 28fa930..554e74d 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ def readme(): long_description_content_type='text/markdown', install_requires=[ 'Django>=1.8', - 'pystache', + 'pystache<0.6', ], classifiers=[ 'Framework :: Django', @@ -34,22 +34,20 @@ def readme(): 'Environment :: Web Environment', 'License :: OSI Approved :: MIT License', 'Natural Language :: English', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', - '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', 'Framework :: Django', - 'Framework :: Django :: 1.8', - 'Framework :: Django :: 1.11', - 'Framework :: Django :: 2.0', - 'Framework :: Django :: 2.1', 'Framework :: Django :: 2.2', 'Framework :: Django :: 3.0', + 'Framework :: Django :: 3.1', + 'Framework :: Django :: 3.2', + 'Framework :: Django :: 4.0', + 'Framework :: Django :: 4.1', + 'Framework :: Django :: 4.2', 'Topic :: Text Processing :: Markup :: HTML', ], @@ -58,6 +56,6 @@ def readme(): 'djangorestframework' ], setup_requires=[ - 'setuptools_scm', + 'setuptools_scm<8', ], ) diff --git a/tests/urls.py b/tests/urls.py index 0624288..b7c05ed 100644 --- a/tests/urls.py +++ b/tests/urls.py @@ -1,4 +1,7 @@ -from django.conf.urls import url +try: + from django.urls import re_path +except ImportError: + from django.conf.urls import url as re_path from tests.views import ( ContextView, @@ -9,9 +12,9 @@ ) urlpatterns = [ - url('^context$', ContextView.as_view()), - url('^partials$', PartialsView.as_view()), - url('^mustachecp$', MustacheCPView.as_view()), - url('^djangocp$', DjangoCPView.as_view()), - url('^apptemplate$', AppTemplateView.as_view()), + re_path('^context$', ContextView.as_view()), + re_path('^partials$', PartialsView.as_view()), + re_path('^mustachecp$', MustacheCPView.as_view()), + re_path('^djangocp$', DjangoCPView.as_view()), + re_path('^apptemplate$', AppTemplateView.as_view()), ]