Skip to content

Commit

Permalink
Merge pull request #205 from respondcreate/github-actions-fork-pr-fix
Browse files Browse the repository at this point in the history
GitHub actions fork pr fix & Django `5.0.x` Added To Test Matrix
  • Loading branch information
respondcreate authored Jan 21, 2024
2 parents 146702a + e336e62 commit 8a29222
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 17 deletions.
36 changes: 31 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
name: Run Tests, Evaluate Coverage, Package & Release

on: [push, pull_request]

on:
push: {}
pull_request:
types:
- opened
- reopened
- synchronize
branches:
- master
pull_request_target:
types:
- opened
- reopened
- synchronize
branches:
- master
jobs:
run-tests:
env:
Expand All @@ -13,8 +28,8 @@ jobs:
matrix:
os: [ubuntu-20.04]
python-version: [python3.9, python3.8]
django-version: [django4.0, django3.2, django3.1, django3.0]
drf-version: [drf3.14, drf3.13, drf3.12, drf3.11]
django-version: [django5.0, django4.0, django3.2, django3.1, django3.0]
drf-version: [drf3.14]
name: ${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.django-version }}-${{ matrix.drf-version }}
steps:
- name: "Set job environments"
Expand All @@ -36,7 +51,18 @@ jobs:
sudo apt-get install -y build-essential
echo "Installing python Pillow library dependencies"
sudo apt-get install -y libraqm0 libfreetype6-dev libfribidi-dev libimagequant-dev libjpeg-dev liblcms2-dev libopenjp2-7-dev libtiff5-dev libwebp-dev libxcb1-dev
- uses: actions/checkout@v2
- name: Checkout code (Push)
uses: actions/checkout@v4
if: github.event_name == 'push'
- name: Checkout code (Pull Request)
uses: actions/checkout@v4
if: github.event_name == 'pull_request_target' || github.event_name == 'pull_request'
with:
# Assume PRs are less than 50 commits
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 50
- name: Set up Python "${{ env.PYTHON_V }}"
uses: actions/setup-python@v2
with:
Expand All @@ -63,7 +89,7 @@ jobs:
parallel-finished: true
publish-to-pypi:
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
needs: run-tests
steps:
- uses: actions/checkout@master
Expand Down
4 changes: 1 addition & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Compatibility
- 3.2.x
- 4.0.x
- 4.1.x
- 5.0.x

**NOTE**: The 1.4 release dropped support for Django 1.5.x & 1.6.x.

Expand All @@ -50,9 +51,6 @@ Compatibility

- `Django REST Framework <http://www.django-rest-framework.org/>`_:

- 3.11.x
- 3.12.x
- 3.13.x
- 3.14.x

Documentation
Expand Down
6 changes: 6 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ Table of Contents

Release Notes
=============
3.1
^^^
- If available when resizing, ``Image.Resampling.LANCZOS`` will be used instead of ``Image.ANTIALIAS``. Thanks, `@alexei <https://github.com/alexei>`_!
- Removed support for djangorestframework < 3.14.x.
- Added support for Django 5.0.

3.0
^^^
- Removed support for Django < 3.x. Thanks, `@browniebroke <https://github.com/browniebroke>`_!
Expand Down
3 changes: 2 additions & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ Django Compatibility
- 3.2.x
- 4.0.x
- 4.1.x
- 5.0.x

Dependencies
------------

- ``Pillow``>= 2.4.x
- ``Pillow``>= 6.2.x

``django-versatileimagefield`` depends on the excellent
`Pillow <https://pillow.readthedocs.io>`__ fork of ``PIL``. If you
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
setup(
name='django-versatileimagefield',
packages=find_packages(),
version='3.0',
version='3.1',
author='Jonathan Ellenberger',
author_email='[email protected]',
url='http://github.com/respondcreate/django-versatileimagefield/',
Expand All @@ -16,7 +16,7 @@
long_description=open('README.rst').read(),
zip_safe=False,
install_requires=[
'Pillow>=2.4.0',
'Pillow>=6.2.0',
'python-magic>=0.4.22,<1.0.0',
'Django>=3.0',
],
Expand All @@ -33,6 +33,7 @@
'Framework :: Django :: 3.2',
'Framework :: Django :: 4.0',
'Framework :: Django :: 4.1',
'Framework :: Django :: 5.0',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
Expand Down
11 changes: 5 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ minversion = 3.23.0
requires:
pip >= 21.0.1
envlist =
py{3.8,3.9}-django{30,31,32,40,41}-drf{311,312,313,314}
py{3.8,3.9}-django{30,31,32,40,41,50}-drf{314}

[gh-actions]
python =
Expand All @@ -17,6 +17,7 @@ DJANGO =
3.2: django32
4.0: django40
4.1: django41
5.0: django50

[testenv]
passenv = TRAVIS TRAVIS_* GITHUB_*
Expand All @@ -28,11 +29,9 @@ deps=
django30: Django>=3.0.13,<3.1.0
django31: Django>=3.1.7,<3.2.0
django32: Django>=3.2.0,<3.3.0
django40: Django>=4.0.0,<4.1.0
django41: Django>=4.1.0,<4.2.0
drf311: djangorestframework>=3.11.2,<3.12.0
drf312: djangorestframework>=3.12.4,<3.13.0
drf313: djangorestframework>=3.13,<3.14
django40: Django>=4.0.0,<4.1.13
django41: Django>=4.1.13,<4.2.9
django50: Django>=4.2.9,<5.0.1
drf314: djangorestframework>=3.14,<3.15
flake8
sitepackages = False
Expand Down

0 comments on commit 8a29222

Please sign in to comment.