Updated linters and reformatters #231
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
pull_request: | |
types: [ opened, synchronize ] | |
jobs: | |
test-py-38-39: | |
runs-on: ubuntu-latest | |
env: | |
NODE_VER: 20.x | |
strategy: | |
matrix: | |
python-ver: [ '3.8', '3.9' ] | |
django-ver: [ '<4.3' ] | |
mjml-ver: [ '4.14.1', '4.15.2' ] | |
tcp-server-ver: [ 'v1.2' ] | |
fail-fast: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Checkout tcp server | |
uses: actions/checkout@v4 | |
with: | |
repository: 'liminspace/mjml-tcpserver' | |
ref: ${{ matrix.tcp-server-ver }} | |
path: './mjml-tcpserver' | |
- name: Set up Python ${{ matrix.python-ver }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-ver }} | |
- name: Cache pip | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ matrix.python-ver }}-${{ hashFiles('requirements.test.txt') }} | |
restore-keys: | |
${{ runner.os }}-pip-${{ matrix.python-ver }}- | |
- name: Install Python dependencies | |
run: | | |
pip install -U -r requirements.test.txt | |
pip install -U "Django${{ matrix.django-ver }}" | |
- name: Set up Node.js ${{ env.NODE_VER }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VER }} | |
- name: Cache npm | |
uses: actions/cache@v4 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-npm-${{ env.NODE_VER }}-${{ matrix.mjml-ver }} | |
restore-keys: | |
${{ runner.os }}-npm-${{ 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 | |
env: | |
DJANGO_SETTINGS_MODULE: tests.settings | |
PYTHONWARNINGS: always | |
run: | | |
coverage run -m django test | |
coverage report | |
test-py-310-312: | |
runs-on: ubuntu-latest | |
env: | |
NODE_VER: 20.x | |
strategy: | |
matrix: | |
python-ver: [ '3.10', '3.11', '3.12' ] | |
django-ver: [ '<4.3', '<5.2' ] | |
mjml-ver: [ '4.14.1', '4.15.2' ] | |
tcp-server-ver: [ 'v1.2' ] | |
fail-fast: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Checkout tcp server | |
uses: actions/checkout@v4 | |
with: | |
repository: 'liminspace/mjml-tcpserver' | |
ref: ${{ matrix.tcp-server-ver }} | |
path: './mjml-tcpserver' | |
- name: Set up Python ${{ matrix.python-ver }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-ver }} | |
- name: Cache pip | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ matrix.python-ver }}-${{ hashFiles('requirements.test.txt') }} | |
restore-keys: | |
${{ runner.os }}-pip-${{ matrix.python-ver }}- | |
- name: Install Python dependencies | |
run: | | |
pip install -U -r requirements.test.txt | |
pip install "Django${{ matrix.django-ver }}" | |
- name: Set up Node.js ${{ env.NODE_VER }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VER }} | |
- name: Cache npm | |
uses: actions/cache@v4 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-npm-${{ env.NODE_VER }}-${{ matrix.mjml-ver }} | |
restore-keys: | |
${{ runner.os }}-npm-${{ 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 | |
env: | |
DJANGO_SETTINGS_MODULE: tests.settings | |
PYTHONWARNINGS: always | |
run: | | |
coverage run -m django test | |
coverage report |