Skip to content

Commit 181352f

Browse files
authored
Release 1.0 (#173)
1 parent 8b048e6 commit 181352f

File tree

23 files changed

+237
-420
lines changed

23 files changed

+237
-420
lines changed

.github/workflows/test.yml

Lines changed: 56 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -3,77 +3,29 @@ name: Test
33
on:
44
push:
55
pull_request:
6-
types: [opened, synchronize]
6+
types: [ opened, synchronize ]
77

88
jobs:
9-
test-py-2-7:
10-
runs-on: ubuntu-latest
11-
env:
12-
PYTHON_VER: 2.7
13-
NODE_VER: 14
14-
strategy:
15-
matrix:
16-
django-ltver: [1.9, '1.10', 1.11, 1.12]
17-
mjml-ver: [4.5.1, 4.6.3, 4.7.1, 4.8.2, 4.9.3, 4.10.3, '4.11.0']
18-
fail-fast: false
19-
steps:
20-
- name: Checkout
21-
uses: actions/checkout@v2
22-
- name: Set up Python ${{ env.PYTHON_VER }}
23-
uses: actions/setup-python@v2
24-
with:
25-
python-version: ${{ env.PYTHON_VER }}
26-
- name: Cache pip
27-
uses: actions/cache@v2
28-
env:
29-
cache-name: cache-pip
30-
with:
31-
path: ~/.cache/pip
32-
key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.PYTHON_VER }}-${{ matrix.django-ltver }}
33-
restore-keys: |
34-
${{ runner.os }}-${{ env.cache-name }}-${{ env.PYTHON_VER }}-
35-
- name: Install Python dependencies
36-
run: |
37-
pip install "Django<${{ matrix.django-ltver }}"
38-
pip install "requests>=2.20.0,<=2.24.0"
39-
pip install mock
40-
- name: Set up Node.js ${{ env.NODE_VER }}
41-
uses: actions/setup-node@v2
42-
with:
43-
node-version: ${{ env.NODE_VER }}
44-
- name: Cache npm
45-
uses: actions/cache@v2
46-
env:
47-
cache-name: cache-npm
48-
with:
49-
path: ~/.npm
50-
key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.NODE_VER }}-${{ matrix.mjml-ver }}
51-
restore-keys: |
52-
${{ runner.os }}-${{ env.cache-name }}-${{ env.NODE_VER }}-
53-
- name: Install Node dependencies
54-
run: |
55-
npm cache verify
56-
npm install -g mjml-http-server@0.0.3
57-
npm install mjml@${{ matrix.mjml-ver }}
58-
- name: Show info
59-
run: |
60-
node_modules/.bin/mjml --version
61-
- name: Test
62-
run: |
63-
python tools.py test
649
test-py-3-6:
6510
runs-on: ubuntu-latest
6611
env:
6712
PYTHON_VER: 3.6
6813
NODE_VER: 14
6914
strategy:
7015
matrix:
71-
django-ltver: [1.12, 2.1, 2.2, 2.3, 3.1, 3.2, 3.3]
72-
mjml-ver: [4.5.1, 4.6.3, 4.7.1, 4.8.2, 4.9.3, 4.10.3, '4.11.0']
16+
django-ltver: [ 2.3, 3.1, 3.2, 3.3 ]
17+
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' ]
18+
tcp-server-ver: [ 'v1.1' ]
7319
fail-fast: false
7420
steps:
7521
- name: Checkout
7622
uses: actions/checkout@v2
23+
- name: Checkout tcp server
24+
uses: actions/checkout@v2
25+
with:
26+
repository: 'liminspace/mjml-tcpserver'
27+
ref: ${{ matrix.tcp-server-ver }}
28+
path: './mjml-tcpserver'
7729
- name: Set up Python ${{ env.PYTHON_VER }}
7830
uses: actions/setup-python@v2
7931
with:
@@ -90,7 +42,7 @@ jobs:
9042
- name: Install Python dependencies
9143
run: |
9244
pip install "Django<${{ matrix.django-ltver }}"
93-
pip install "requests>=2.20.0,<=2.24.0"
45+
pip install "requests>=2.24.0,<2.28.0"
9446
- name: Set up Node.js ${{ env.NODE_VER }}
9547
uses: actions/setup-node@v2
9648
with:
@@ -107,7 +59,7 @@ jobs:
10759
- name: Install Node dependencies
10860
run: |
10961
npm cache verify
110-
npm install -g mjml-http-server@0.0.3
62+
npm install -g mjml-http-server@0.1.0
11163
npm install mjml@${{ matrix.mjml-ver }}
11264
- name: Show info
11365
run: |
@@ -122,12 +74,19 @@ jobs:
12274
NODE_VER: 14
12375
strategy:
12476
matrix:
125-
django-ltver: [1.12, 2.1, 2.2, 2.3, 3.1, 3.2, 3.3]
126-
mjml-ver: [4.5.1, 4.6.3, 4.7.1, 4.8.2, 4.9.3, 4.10.3, '4.11.0']
77+
django-ltver: [ 2.3, 3.1, 3.2, 3.3 ]
78+
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' ]
79+
tcp-server-ver: [ 'v1.1' ]
12780
fail-fast: false
12881
steps:
12982
- name: Checkout
13083
uses: actions/checkout@v2
84+
- name: Checkout tcp server
85+
uses: actions/checkout@v2
86+
with:
87+
repository: 'liminspace/mjml-tcpserver'
88+
ref: ${{ matrix.tcp-server-ver }}
89+
path: './mjml-tcpserver'
13190
- name: Set up Python ${{ env.PYTHON_VER }}
13291
uses: actions/setup-python@v2
13392
with:
@@ -144,7 +103,7 @@ jobs:
144103
- name: Install Python dependencies
145104
run: |
146105
pip install "Django<${{ matrix.django-ltver }}"
147-
pip install "requests>=2.20.0,<=2.24.0"
106+
pip install "requests>=2.24.0,<=2.29.0"
148107
- name: Set up Node.js ${{ env.NODE_VER }}
149108
uses: actions/setup-node@v2
150109
with:
@@ -161,7 +120,7 @@ jobs:
161120
- name: Install Node dependencies
162121
run: |
163122
npm cache verify
164-
npm install -g mjml-http-server@0.0.3
123+
npm install -g mjml-http-server@0.1.0
165124
npm install mjml@${{ matrix.mjml-ver }}
166125
- name: Show info
167126
run: |
@@ -176,12 +135,19 @@ jobs:
176135
NODE_VER: 14
177136
strategy:
178137
matrix:
179-
django-ltver: [2.3, 3.1, 3.2, 3.3, 4.1]
180-
mjml-ver: [4.5.1, 4.6.3, 4.7.1, 4.8.2, 4.9.3, 4.10.3, '4.11.0']
138+
django-ltver: [ 2.3, 3.1, 3.2, 3.3, 4.1, 4.2 ]
139+
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' ]
140+
tcp-server-ver: [ 'v1.1' ]
181141
fail-fast: false
182142
steps:
183143
- name: Checkout
184144
uses: actions/checkout@v2
145+
- name: Checkout tcp server
146+
uses: actions/checkout@v2
147+
with:
148+
repository: 'liminspace/mjml-tcpserver'
149+
ref: ${{ matrix.tcp-server-ver }}
150+
path: './mjml-tcpserver'
185151
- name: Set up Python ${{ env.PYTHON_VER }}
186152
uses: actions/setup-python@v2
187153
with:
@@ -198,7 +164,7 @@ jobs:
198164
- name: Install Python dependencies
199165
run: |
200166
pip install "Django<${{ matrix.django-ltver }}"
201-
pip install "requests>=2.20.0,<=2.24.0"
167+
pip install "requests>=2.24.0,<=2.29.0"
202168
- name: Set up Node.js ${{ env.NODE_VER }}
203169
uses: actions/setup-node@v2
204170
with:
@@ -215,7 +181,7 @@ jobs:
215181
- name: Install Node dependencies
216182
run: |
217183
npm cache verify
218-
npm install -g mjml-http-server@0.0.3
184+
npm install -g mjml-http-server@0.1.0
219185
npm install mjml@${{ matrix.mjml-ver }}
220186
- name: Show info
221187
run: |
@@ -230,12 +196,19 @@ jobs:
230196
NODE_VER: 14
231197
strategy:
232198
matrix:
233-
django-ltver: [2.3, 3.1, 3.2, 3.3, 4.1]
234-
mjml-ver: [4.5.1, 4.6.3, 4.7.1, 4.8.2, 4.9.3, 4.10.3, '4.11.0']
199+
django-ltver: [ 2.3, 3.1, 3.2, 3.3, 4.1, 4.2 ]
200+
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' ]
201+
tcp-server-ver: [ 'v1.1' ]
235202
fail-fast: false
236203
steps:
237204
- name: Checkout
238205
uses: actions/checkout@v2
206+
- name: Checkout tcp server
207+
uses: actions/checkout@v2
208+
with:
209+
repository: 'liminspace/mjml-tcpserver'
210+
ref: ${{ matrix.tcp-server-ver }}
211+
path: './mjml-tcpserver'
239212
- name: Set up Python ${{ env.PYTHON_VER }}
240213
uses: actions/setup-python@v2
241214
with:
@@ -252,7 +225,7 @@ jobs:
252225
- name: Install Python dependencies
253226
run: |
254227
pip install "Django<${{ matrix.django-ltver }}"
255-
pip install "requests>=2.20.0,<=2.24.0"
228+
pip install "requests>=2.24.0,<=2.29.0"
256229
- name: Set up Node.js ${{ env.NODE_VER }}
257230
uses: actions/setup-node@v2
258231
with:
@@ -269,7 +242,7 @@ jobs:
269242
- name: Install Node dependencies
270243
run: |
271244
npm cache verify
272-
npm install -g mjml-http-server@0.0.3
245+
npm install -g mjml-http-server@0.1.0
273246
npm install mjml@${{ matrix.mjml-ver }}
274247
- name: Show info
275248
run: |
@@ -284,12 +257,19 @@ jobs:
284257
NODE_VER: 14
285258
strategy:
286259
matrix:
287-
django-ltver: [3.3, 4.1]
288-
mjml-ver: [4.5.1, 4.6.3, 4.7.1, 4.8.2, 4.9.3, 4.10.3, '4.11.0']
260+
django-ltver: [ 3.3, 4.1, 4.2 ]
261+
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' ]
262+
tcp-server-ver: [ 'v1.1' ]
289263
fail-fast: false
290264
steps:
291265
- name: Checkout
292266
uses: actions/checkout@v2
267+
- name: Checkout tcp server
268+
uses: actions/checkout@v2
269+
with:
270+
repository: 'liminspace/mjml-tcpserver'
271+
ref: ${{ matrix.tcp-server-ver }}
272+
path: './mjml-tcpserver'
293273
- name: Set up Python ${{ env.PYTHON_VER }}
294274
uses: actions/setup-python@v2
295275
with:
@@ -306,7 +286,7 @@ jobs:
306286
- name: Install Python dependencies
307287
run: |
308288
pip install "Django<${{ matrix.django-ltver }}"
309-
pip install "requests>=2.20.0,<=2.24.0"
289+
pip install "requests>=2.24.0,<=2.29.0"
310290
- name: Set up Node.js ${{ env.NODE_VER }}
311291
uses: actions/setup-node@v2
312292
with:
@@ -323,7 +303,7 @@ jobs:
323303
- name: Install Node dependencies
324304
run: |
325305
npm cache verify
326-
npm install -g mjml-http-server@0.0.3
306+
npm install -g mjml-http-server@0.1.0
327307
npm install mjml@${{ matrix.mjml-ver }}
328308
- name: Show info
329309
run: |

.pyup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
branch: master
1+
branch: main
22
schedule: "every three months"
33
search: False
44

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
1.0 (2022-10-07)
2+
================
3+
* Stopped supporting Python 2.7
4+
* Stopped supporting Django 1.8, 1.9, 1.10, 1.11, 2.0 and 2.1
5+
* Removed MJML 4.5 from tests
6+
* Added MJML 4.12 and 4.13 in tests
7+
* Moved MJML TCP-Server into separated repo https://github.com/danihodovic/mjml-server
8+
* Renamed base branch `master` to `main`
9+
10+
111
0.12.0 (2022-01-19)
212
===================
313
* Added supporting Django 4.0

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
include README.rst
22
include CHANGELOG.md
3-
include mjml/node/*
3+
include LICENSE

README.rst

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. image:: https://github.com/liminspace/django-mjml/actions/workflows/test.yml/badge.svg?branch=master
1+
.. image:: https://github.com/liminspace/django-mjml/actions/workflows/test.yml/badge.svg?branch=main
22
:target: https://github.com/liminspace/django-mjml/actions/workflows/test.yml
33
:alt: test
44

@@ -25,9 +25,9 @@ Installation
2525
Requirements:
2626
^^^^^^^^^^^^^
2727

28-
* ``Django`` from 1.8 to 4.0
29-
* ``requests`` from 2.20.0 (only if you are going to use API HTTP-server for rendering)
30-
* ``mjml`` from 2.3 to 4.11.0
28+
* ``Django`` from 2.2 to 4.1
29+
* ``requests`` from 2.24.0 (only if you are going to use API HTTP-server for rendering)
30+
* ``mjml`` from 3.6.3 to 4.13.0
3131

3232
**\1\. Install** ``mjml``.
3333

@@ -37,11 +37,11 @@ See https://github.com/mjmlio/mjml#installation and https://mjml.io/documentatio
3737

3838
$ pip install django-mjml
3939

40-
If you want to use API HTTP-server you also need ``requests`` (at least version 2.20)::
40+
If you want to use API HTTP-server you also need ``requests`` (at least version 2.24)::
4141

4242
$ pip install django-mjml[requests]
4343

44-
To install development version use ``git+https://github.com/liminspace/django-mjml.git@master`` instead ``django-mjml``.
44+
To install development version use ``git+https://github.com/liminspace/django-mjml.git@main`` instead ``django-mjml``.
4545

4646
**\3\. Set up** ``settings.py`` **in your django project.** ::
4747

@@ -61,15 +61,13 @@ Load ``mjml`` in your django template and use ``mjml`` tag that will compile MJM
6161

6262
{% mjml %}
6363
<mjml>
64-
<mj-body>
65-
<mj-container>
66-
<mj-section>
67-
<mj-column>
68-
<mj-text>Hello world!</mj-text>
69-
</mj-column>
70-
</mj-section>
71-
</mj-container>
72-
</mj-body>
64+
<mj-body>
65+
<mj-section>
66+
<mj-column>
67+
<mj-text>Hello world!</mj-text>
68+
</mj-column>
69+
</mj-section>
70+
</mj-body>
7371
</mjml>
7472
{% endmjml %}
7573

docker/mjml-tcpserver/Dockerfile

Lines changed: 0 additions & 20 deletions
This file was deleted.

mjml/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
__version__ = '0.12.0'
1+
__version__ = '1.0'
22

33
default_app_config = 'mjml.apps.MJMLConfig'

0 commit comments

Comments
 (0)