Skip to content

feat: add async SMTP support and Message.send_async() #189

feat: add async SMTP support and Message.send_async()

feat: add async SMTP support and Message.send_async() #189

Workflow file for this run

name: Tests
on:
push:
branches:
- master
- '*'
pull_request:
branches:
- master
jobs:
tests:
name: "unit / ${{ matrix.name }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- {name: '3.14', python: '3.14', os: ubuntu-latest, tox: py314}
- {name: '3.13', python: '3.13', os: ubuntu-latest, tox: py313}
- {name: '3.12', python: '3.12', os: ubuntu-latest, tox: py312}
- {name: '3.11', python: '3.11', os: ubuntu-latest, tox: py311}
- {name: '3.10', python: '3.10', os: ubuntu-latest, tox: py310}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
cache: pip
- name: update pip
run: |
pip install -U wheel
pip install -U setuptools
python -m pip install -U pip
- run: pip install tox
- name: run tests
run: tox -e ${{ matrix.tox }} -- -m "not e2e and not django"
django:
name: "django / ${{ matrix.django }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- {django: '4.2', tox: django42}
- {django: '5.2', tox: django52}
- {django: '6.0', tox: django60}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: pip
- name: update pip
run: |
pip install -U wheel
pip install -U setuptools
python -m pip install -U pip
- run: pip install tox
- name: run django tests
run: tox -e ${{ matrix.tox }}
docs:
name: "docs"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: pip
- name: install dependencies
run: |
pip install -e .
pip install sphinx -r docs/requirements.txt
- name: build docs
run: sphinx-build -W -b html docs docs/_build/html
typecheck:
name: "typecheck"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: pip
- name: update pip
run: |
pip install -U wheel
pip install -U setuptools
python -m pip install -U pip
- run: pip install tox
- name: run mypy
run: tox -e typecheck
e2e:
name: "e2e / ${{ matrix.name }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- {name: '3.14', python: '3.14', os: ubuntu-latest, tox: py314}
services:
mailpit:
image: axllent/mailpit
ports:
- 1025:1025
- 8025:8025
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
cache: pip
- name: update pip
run: |
pip install -U wheel
pip install -U setuptools
python -m pip install -U pip
- run: pip install tox
- name: run e2e tests
env:
SMTP_TEST_SUBJECT_SUFFIX: "github-actions sha:${{ github.sha }} run_id:${{ github.run_id }}"
SMTP_TEST_MAIL_FROM: python-emails-tests@lavr.me
SMTP_TEST_MAIL_TO: python-emails-tests@lavr.me
SMTP_TEST_SETS: LOCAL
SMTP_TEST_LOCAL_HOST: 127.0.0.1
SMTP_TEST_LOCAL_PORT: 1025
SMTP_TEST_LOCAL_WITHOUT_TLS: true
run: tox -e ${{ matrix.tox }} -- -m e2e