Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 12 additions & 34 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.x"
- run: sudo apt-get update && sudo apt-get install -y gettext
- name: Install Python dependencies
run: python -m pip install --upgrade pip build wheel twine readme-renderer
- run: python -m build --sdist --wheel
- run: python -m twine check dist/*
- uses: astral-sh/setup-uv@v7
- run: uvx --from build pyproject-build --sdist --wheel
- run: uvx twine check dist/*
- uses: actions/upload-artifact@v6
with:
path: dist/*
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.11"
- run: sudo apt-get update && sudo apt-get install -y gettext
- run: python -m pip install -e '.[docs]'
- run: python -m mkdocs build --strict
- uses: astral-sh/setup-uv@v7
- run: uv run mkdocs build --strict
SQLite:
needs: [dist, docs]
runs-on: ubuntu-latest
Expand All @@ -54,13 +47,11 @@ jobs:
django-version: "6.0"
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
- run: sudo apt-get update && sudo apt-get install -y gettext
- uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
- run: sudo apt-get update && sudo apt-get install -y gettext
- run: python -m pip install -e '.[test]'
- run: python -m pip install Django~=${{ matrix.django-version }}.0
- run: python -m pytest
- run: uv run --with django~=${{ matrix.django-version }}.0 pytest
- uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand All @@ -70,32 +61,23 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.x"]
wagtail-version:
- "6.3"
- "7.0"
- "7.1"
- "7.2"
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- run: sudo apt-get update && sudo apt-get install -y gettext
- run: python -m pip install -e ".[test,wagtail]"
- run: python -m pip install wagtail~=${{ matrix.wagtail-version }}.0
- run: python -m pytest
- uses: astral-sh/setup-uv@v7
- run: uv run --extra wagtail --with wagtail~=${{ matrix.wagtail-version }}.0 --with django~=5.2.0 pytest
- uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: ${{ matrix.extras }}
PostgreSQL:
needs: [dist, docs]
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.x"]
services:
postgres:
image: postgres
Expand All @@ -106,20 +88,16 @@ jobs:
- 5432/tcp
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v6
- run: sudo apt-get update && sudo apt-get install -y gettext
- run: python -m pip install -e ".[test,postgres]"
- run: psql template1 -c "CREATE EXTENSION citext;"
env:
PGHOST: localhost
PGPORT: ${{ job.services.postgres.ports[5432] }}
PGUSER: django
PGPASSWORD: django
- run: python -m pytest
- uses: astral-sh/setup-uv@v7
- run: uv run --extra postgres pytest
env:
DB_PORT: ${{ job.services.postgres.ports[5432] }}
DB: pg
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ target/
# mkdocs documentation
/site/

# UV
uv.lock

tests/local.py
docs/_build/
venv
Expand Down
12 changes: 6 additions & 6 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ build:
python: "3"
apt_packages:
- gettext
python:
install:
- method: pip
path: .
extra_requirements:
- docs
jobs:
install:
- curl -LsSf https://astral.sh/uv/install.sh | sh
build:
html:
- $HOME/.local/bin/uv run mkdocs build --site-dir $READTHEDOCS_OUTPUT/html
mkdocs:
configuration: mkdocs.yml
19 changes: 13 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,19 @@ dependencies = [
]

[project.optional-dependencies]
wagtail = [
"wagtail>=6.3",
]
postgres = [
"django-citext",
"psycopg",
]

[dependency-groups]
dev = [
{ include-group = "test" },
{ include-group = "docs" },
]
test = [
"pytest",
"pytest-cov",
Expand All @@ -60,12 +73,6 @@ docs = [
"markdown-callouts",
"Pygments",
]
wagtail = [
"wagtail>=6.3",
]
postgres = [
"django-citext",
]

[project.urls]
Project-URL = "https://github.com/codingjoe/django-mail-auth"
Expand Down