Skip to content

Commit

Permalink
Merge pull request #20 from maykinmedia/feature/django-3.2
Browse files Browse the repository at this point in the history
[#635] Added Django 4.2 support
  • Loading branch information
alextreme authored Jun 29, 2023
2 parents 21897d7 + 977a22b commit 121eda2
Show file tree
Hide file tree
Showing 8 changed files with 150 additions and 9 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Tests and PyPI publishing

on:
push:
branches:
- main
tags:
- '*'
pull_request:
workflow_dispatch:

jobs:
tests:
name: Run tests Python ${{ matrix.python }}, Django ${{ matrix.django }})
runs-on: ubuntu-latest
strategy:
matrix:
python: ['3.8', '3.9', '3.10', '3.11']
django: ['3.2', '4.1', '4.2']
exclude:
- python: '3.11'
django: '3.2'

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}

- name: Install dependencies
run: pip install tox tox-gh-actions

- name: Run tests
run: tox
env:
PYTHON_VERSION: ${{ matrix.python }}
DJANGO: ${{ matrix.django }}

- name: Publish coverage report
uses: codecov/codecov-action@v3

publish:
name: Publish package to PyPI
runs-on: ubuntu-latest
needs:
- tests

if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Build sdist and wheel
run: |
pip install pip setuptools wheel --upgrade
python setup.py sdist bdist_wheel
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
34 changes: 34 additions & 0 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Linting and code quality

on:
push:
branches:
- main
tags:
paths:
- '**.py'
- .github/workflows/code_quality.yml
pull_request:
paths:
- '**.py'
- .github/workflows/code_quality.yml
workflow_dispatch:

jobs:
linting:
name: Code-quality checks
runs-on: ubuntu-latest
strategy:
matrix:
toxenv:
- isort
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: pip install tox
- run: tox
env:
TOXENV: ${{ matrix.toxenv }}
9 changes: 9 additions & 0 deletions django_regex_redirects.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Metadata-Version: 2.1
Name: django-regex-redirects
Version: 0.4.0
Summary: Django redirects, with regular expressions
Home-page: https://github.com/maykinmedia/django-regex-redirects
Author: Alex de Landgraaf
Author-email: [email protected]
License: BSD licence, see LICENCE.txt
License-File: LICENSE
19 changes: 19 additions & 0 deletions django_regex_redirects.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
LICENSE
README.md
setup.py
django_regex_redirects.egg-info/PKG-INFO
django_regex_redirects.egg-info/SOURCES.txt
django_regex_redirects.egg-info/dependency_links.txt
django_regex_redirects.egg-info/top_level.txt
regex_redirects/__init__.py
regex_redirects/actions.py
regex_redirects/admin.py
regex_redirects/apps.py
regex_redirects/middleware.py
regex_redirects/models.py
regex_redirects/tests.py
regex_redirects/migrations/0001_initial.py
regex_redirects/migrations/0002_auto_20151217_1938.py
regex_redirects/migrations/0004_auto_20170512_1349.py
regex_redirects/migrations/0005_auto_20210425_1321.py
regex_redirects/migrations/__init__.py
1 change: 1 addition & 0 deletions django_regex_redirects.egg-info/dependency_links.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions django_regex_redirects.egg-info/top_level.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
regex_redirects
2 changes: 1 addition & 1 deletion regex_redirects/models.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import unicode_literals

from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _


class Redirect(models.Model):
Expand Down
28 changes: 20 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
[tox]
envlist =
{py39}-django-2.2
{py39}-django-3.2
envlist =
py{38,39,310}-django{32,41,42}
py311-django{41,42}
isort
skip_missing_interpreters = true

[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311

[gh-actions:env]
DJANGO =
3.2: django32
4.1: django41
4.2: django42

[testenv]
deps=
django-2.2: Django>=2.0,<2.3
django-3.2: Django>=3.0,<3.3
django32: Django~=3.2.0
django41: Django~=4.1.0
django42: Django~=4.2.0
master: https://github.com/django/django/archive/master.tar.gz
coverage
coveralls
commands=coverage run --rcfile={toxinidir}/.coveragerc manage.py test

0 comments on commit 121eda2

Please sign in to comment.