Merge pull request #207 from lavr/fix/optional-jinja2-dependency #175
This file contains hidden or 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: 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 }} | |
| 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 |