chore: bump version to 0.4.0 and add changelog entry #120
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: [main, develop] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v7 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Poetry | |
| uses: snok/install-poetry@v1 | |
| with: | |
| version: 2.4.1 | |
| virtualenvs-create: true | |
| virtualenvs-in-project: true | |
| - name: Load cached venv | |
| id: cached-poetry-dependencies | |
| uses: actions/cache@v6 | |
| with: | |
| path: .venv | |
| key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
| - name: Install dependencies | |
| if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
| run: poetry install --no-interaction --no-root | |
| - name: Install project | |
| run: poetry install --no-interaction | |
| - name: Run tests with coverage | |
| run: | | |
| poetry run pytest --cov=postmark --cov-report=xml --cov-report=term --cov-fail-under=85 | |
| django-tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| # Currently supported Django release series. The main `test` job above | |
| # already exercises tests/django_backend/ against the pinned dev version | |
| # (Django 5.2) across every supported Python version; this job additionally | |
| # checks the Django backend against the rest of the support matrix. | |
| django-version: ["4.2", "5.2", "6.0", "6.1"] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Set up Python | |
| uses: actions/setup-python@v7 | |
| with: | |
| # 3.12 is the one Python version every entry in the matrix supports: | |
| # Django 4.2 added 3.12 support in 4.2.8; Django 6.0/6.1 require 3.12+. | |
| python-version: "3.12" | |
| - name: Install Poetry | |
| uses: snok/install-poetry@v1 | |
| with: | |
| version: 2.4.1 | |
| virtualenvs-create: true | |
| virtualenvs-in-project: true | |
| - name: Install dependencies | |
| run: poetry install --no-interaction | |
| - name: Install Django ${{ matrix.django-version }} | |
| run: poetry run pip install "django~=${{ matrix.django-version }}.0" | |
| - name: Run Django backend tests | |
| run: poetry run pytest tests/django_backend/ -v | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Set up Python | |
| uses: actions/setup-python@v7 | |
| with: | |
| python-version: "3.14" | |
| - name: Install Poetry | |
| uses: snok/install-poetry@v1 | |
| with: | |
| version: 2.4.1 | |
| virtualenvs-create: true | |
| virtualenvs-in-project: true | |
| - name: Install dependencies | |
| run: | | |
| poetry install --no-interaction --with dev | |
| - name: Run Ruff lint | |
| run: poetry run ruff check . | |
| - name: Run Ruff format | |
| run: poetry run ruff format --check . | |
| - name: Run MyPy | |
| run: poetry run mypy postmark/ |