Skip to content

Commit

Permalink
* Added Python 3.12 in tests
Browse files Browse the repository at this point in the history
 * Added supporting Django 5.0
  • Loading branch information
liminspace committed Jan 8, 2024
1 parent 701629c commit 8a513c7
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 16 deletions.
81 changes: 71 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
django-ver: [ '<2.3', '<3.1', '<3.2', '<3.3' ]
mjml-ver: [ '4.6.3', '4.7.1', '4.8.2', '4.9.3', '4.10.4', '4.11.0', '4.12.0', '4.13.0', '4.14.0' ]
mjml-ver: [ '4.6.3', '4.7.1', '4.8.2', '4.9.3', '4.10.4', '4.11.0', '4.12.0', '4.13.0', '4.14.1' ]
tcp-server-ver: [ 'v1.1' ]
fail-fast: false
steps:
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
strategy:
matrix:
django-ver: [ '<2.3', '<3.1', '<3.2', '<3.3' ]
mjml-ver: [ '4.6.3', '4.7.1', '4.8.2', '4.9.3', '4.10.4', '4.11.0', '4.12.0', '4.13.0', '4.14.0' ]
mjml-ver: [ '4.6.3', '4.7.1', '4.8.2', '4.9.3', '4.10.4', '4.11.0', '4.12.0', '4.13.0', '4.14.1' ]
tcp-server-ver: [ 'v1.1' ]
fail-fast: false
steps:
Expand Down Expand Up @@ -135,8 +135,8 @@ jobs:
NODE_VER: 14
strategy:
matrix:
django-ver: [ '<2.3', '<3.1', '<3.2', '<3.3', '<4.1', '<4.2' ]
mjml-ver: [ '4.6.3', '4.7.1', '4.8.2', '4.9.3', '4.10.4', '4.11.0', '4.12.0', '4.13.0', '4.14.0' ]
django-ver: [ '<2.3', '<3.1', '<3.2', '<3.3', '<4.1', '<4.2', '<4.3' ]
mjml-ver: [ '4.6.3', '4.7.1', '4.8.2', '4.9.3', '4.10.4', '4.11.0', '4.12.0', '4.13.0', '4.14.1' ]
tcp-server-ver: [ 'v1.1' ]
fail-fast: false
steps:
Expand Down Expand Up @@ -196,8 +196,8 @@ jobs:
NODE_VER: 14
strategy:
matrix:
django-ver: [ '<2.3', '<3.1', '<3.2', '<3.3', '<4.1', '<4.2' ]
mjml-ver: [ '4.6.3', '4.7.1', '4.8.2', '4.9.3', '4.10.4', '4.11.0', '4.12.0', '4.13.0', '4.14.0' ]
django-ver: [ '<2.3', '<3.1', '<3.2', '<3.3', '<4.1', '<4.2', '<4.3' ]
mjml-ver: [ '4.6.3', '4.7.1', '4.8.2', '4.9.3', '4.10.4', '4.11.0', '4.12.0', '4.13.0', '4.14.1' ]
tcp-server-ver: [ 'v1.1' ]
fail-fast: false
steps:
Expand Down Expand Up @@ -257,8 +257,8 @@ jobs:
NODE_VER: 14
strategy:
matrix:
django-ver: [ '<3.3', '<4.1', '<4.2', '<4.3' ]
mjml-ver: [ '4.6.3', '4.7.1', '4.8.2', '4.9.3', '4.10.4', '4.11.0', '4.12.0', '4.13.0', '4.14.0' ]
django-ver: [ '<3.3', '<4.1', '<4.2', '<4.3', '<5.1' ]
mjml-ver: [ '4.6.3', '4.7.1', '4.8.2', '4.9.3', '4.10.4', '4.11.0', '4.12.0', '4.13.0', '4.14.1' ]
tcp-server-ver: [ 'v1.1' ]
fail-fast: false
steps:
Expand Down Expand Up @@ -318,8 +318,69 @@ jobs:
NODE_VER: 14
strategy:
matrix:
django-ver: [ '<4.2', '<4.3' ]
mjml-ver: [ '4.6.3', '4.7.1', '4.8.2', '4.9.3', '4.10.4', '4.11.0', '4.12.0', '4.13.0', '4.14.0' ]
django-ver: [ '<4.2', '<4.3', '<5.1' ]
mjml-ver: [ '4.6.3', '4.7.1', '4.8.2', '4.9.3', '4.10.4', '4.11.0', '4.12.0', '4.13.0', '4.14.1' ]
tcp-server-ver: [ 'v1.1' ]
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout tcp server
uses: actions/checkout@v3
with:
repository: 'liminspace/mjml-tcpserver'
ref: ${{ matrix.tcp-server-ver }}
path: './mjml-tcpserver'
- name: Set up Python ${{ env.PYTHON_VER }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VER }}
- name: Cache pip
uses: actions/cache@v3
env:
cache-name: cache-pip
with:
path: ~/.cache/pip
key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.PYTHON_VER }}-${{ matrix.django-ver }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-${{ env.PYTHON_VER }}-
- name: Install Python dependencies
run: |
pip install "Django${{ matrix.django-ver }}"
pip install "requests>=2.24.0,<=2.29.0"
- name: Set up Node.js ${{ env.NODE_VER }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VER }}
- name: Cache npm
uses: actions/cache@v3
env:
cache-name: cache-npm
with:
path: ~/.npm
key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.NODE_VER }}-${{ matrix.mjml-ver }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-${{ env.NODE_VER }}-
- name: Install Node dependencies
run: |
npm cache verify
npm install -g mjml-http-server@0.1.0
npm install mjml@${{ matrix.mjml-ver }}
- name: Show info
run: |
node_modules/.bin/mjml --version
- name: Test
run: |
python tools.py test
test-py-3-12:
runs-on: ubuntu-latest
env:
PYTHON_VER: '3.12'
NODE_VER: 14
strategy:
matrix:
django-ver: [ '<4.3', '<5.1' ]
mjml-ver: [ '4.6.3', '4.7.1', '4.8.2', '4.9.3', '4.10.4', '4.11.0', '4.12.0', '4.13.0', '4.14.1' ]
tcp-server-ver: [ 'v1.1' ]
fail-fast: false
steps:
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
1.2 (2024-01-08)
================
* Added Python 3.12 in tests
* Added supporting Django 5.0


1.1 (2023-04-11)
================
* Added Python 3.11 in tests
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ Installation
Requirements:
^^^^^^^^^^^^^

* ``Django`` from 2.2 to 4.2
* ``Django`` from 2.2 to 5.0
* ``requests`` from 2.24.0 (only if you are going to use API HTTP-server for rendering)
* ``mjml`` from 3.6.3 to 4.14.0
* ``mjml`` from 3.6.3 to 4.14.1

**\1\. Install** ``mjml``.

Expand Down
7 changes: 5 additions & 2 deletions mjml/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
__version__ = '1.1'
import django

default_app_config = 'mjml.apps.MJMLConfig'
__version__ = '1.2'

if django.VERSION < (3, 2):
default_app_config = 'mjml.apps.MJMLConfig'
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
wheel==0.37.1
twine==3.8.0
coverage==6.2
django>=2.2,<4.2
django>=2.2,<5.1
requests>=2.24.0,<2.29.0
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
platforms=['OS Independent'],
python_requires='>=3.6',
install_requires=[
'django >=2.2,<5.0',
'django >=2.2,<5.1',
],
extras_require={
'requests': [
Expand Down

0 comments on commit 8a513c7

Please sign in to comment.