Skip to content
Closed
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
90 changes: 90 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: CI

on:
push:
branches: [main]
tags: ["v*"] # run on version tags
pull_request:
branches: [main] # run on PRs targeting main
release:
types: [published] # run on Github release

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.14"
- name: Install dependencies
run: pip install tox
- name: Lint check
run: tox -e lint
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install tox tox-gh-actions
- name: Run tests
run: tox
build:
name: Build release
needs: [lint, test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.14"
- name: Install build tools
run: pip install build
- name: Build package
run: python -m build
- uses: actions/upload-artifact@v6
with:
name: dist
path: dist/
publish-pypi:
name: Upload release to PyPI
needs: [build] # wait for build
if: github.event_name == 'release' # only on release
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/django-webmention
permissions:
id-token: write # required for trusted publishing
steps:
- uses: actions/download-artifact@v7
with:
name: dist
path: dist/
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
publish-pypi-test:
name: Upload release to test PyPI
needs: [build] # wait for build
if: startsWith(github.ref, 'refs/tags/') # only on tags
runs-on: ubuntu-latest
environment:
name: pypi-test
url: https://test.pypi.org/p/django-webmention
permissions:
id-token: write # required for trusted publishing
steps:
- uses: actions/download-artifact@v7
with:
name: dist
path: dist/
- name: Publish package to test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
58 changes: 0 additions & 58 deletions .travis.yml

This file was deleted.

92 changes: 40 additions & 52 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.2",
"Framework :: Django :: 6.0",
"Topic :: Internet :: WWW/HTTP :: Indexing/Search",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
Expand All @@ -23,6 +23,7 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
dependencies = [
"Django>=4.2.0",
Expand All @@ -42,10 +43,10 @@ exclude = ["test*"]

[tool.black]
line-length = 120
target-version = ["py39", "py310", "py311", "py312", "py313"]
target-version = ["py39", "py310", "py311", "py312", "py313", "py314"]

[tool.mypy]
python_version = "3.9"
python_version = "3.10"
warn_unused_configs = true
show_error_context = true
pretty = true
Expand Down Expand Up @@ -89,20 +90,17 @@ xfail_strict = true
[tool.tox]
envlist = [
"py39-django4.2",
"py39-django5.0",
"py39-django5.1",
"py310-django4.2",
"py310-django5.0",
"py310-django5.1",
"py310-django5.2",
"py311-django4.2",
"py311-django5.0",
"py311-django5.1",
"py311-django5.2",
"py312-django4.2",
"py312-django5.0",
"py312-django5.1",
"py313-django4.2",
"py313-django5.0",
"py313-django5.1",
"py312-django5.2",
"py312-django6.0",
"py313-django5.2",
"py313-django6.0",
"py314-django5.2",
"py314-django6.0",
]

[tool.tox.env_run_base]
Expand All @@ -121,34 +119,16 @@ deps = [
"Django>=4.2,<4.3",
]

[tool.tox.env."py39-django5.0"]
deps = [
{ replace = "ref", of = ["tool", "tox", "env_run_base", "deps"], extend = true },
"Django>=5.0,<5.1",
]

[tool.tox.env."py39-django5.1"]
deps = [
{ replace = "ref", of = ["tool", "tox", "env_run_base", "deps"], extend = true },
"Django>=5.1,<5.2",
]

[tool.tox.env."py310-django4.2"]
deps = [
{ replace = "ref", of = ["tool", "tox", "env_run_base", "deps"], extend = true },
"Django>=4.2,<4.3",
]

[tool.tox.env."py310-django5.0"]
deps = [
{ replace = "ref", of = ["tool", "tox", "env_run_base", "deps"], extend = true },
"Django>=5.0,<5.1",
]

[tool.tox.env."py310-django5.1"]
[tool.tox.env."py310-django5.2"]
deps = [
{ replace = "ref", of = ["tool", "tox", "env_run_base", "deps"], extend = true },
"Django>=5.1,<5.2",
"Django>=5.2,<5.3",
]

[tool.tox.env."py311-django4.2"]
Expand All @@ -157,52 +137,52 @@ deps = [
"Django>=4.2,<4.3",
]

[tool.tox.env."py311-django5.0"]
[tool.tox.env."py311-django5.2"]
deps = [
{ replace = "ref", of = ["tool", "tox", "env_run_base", "deps"], extend = true },
"Django>=5.0,<5.1",
"Django>=5.2,<5.3",
]

[tool.tox.env."py311-django5.1"]
[tool.tox.env."py312-django4.2"]
deps = [
{ replace = "ref", of = ["tool", "tox", "env_run_base", "deps"], extend = true },
"Django>=5.1,<5.2",
"Django>=4.2,<4.3",
]

[tool.tox.env."py312-django4.2"]
[tool.tox.env."py312-django5.2"]
deps = [
{ replace = "ref", of = ["tool", "tox", "env_run_base", "deps"], extend = true },
"Django>=4.2,<4.3",
"Django>=5.2,<5.3",
]

[tool.tox.env."py312-django5.0"]
[tool.tox.env."py312-django6.0"]
deps = [
{ replace = "ref", of = ["tool", "tox", "env_run_base", "deps"], extend = true },
"Django>=5.0,<5.1",
"Django>=6.0,<6.1",
]

[tool.tox.env."py312-django5.1"]
[tool.tox.env."py313-django5.2"]
deps = [
{ replace = "ref", of = ["tool", "tox", "env_run_base", "deps"], extend = true },
"Django>=5.1,<5.2",
"Django>=5.2,<5.3",
]

[tool.tox.env."py313-django4.2"]
[tool.tox.env."py313-django6.0"]
deps = [
{ replace = "ref", of = ["tool", "tox", "env_run_base", "deps"], extend = true },
"Django>=4.2,<4.3",
"Django>=6.0,<6.1",
]

[tool.tox.env."py313-django5.0"]
[tool.tox.env."py314-django5.2"]
deps = [
{ replace = "ref", of = ["tool", "tox", "env_run_base", "deps"], extend = true },
"Django>=5.0,<5.1",
"Django>=5.2,<5.3",
]

[tool.tox.env."py313-django5.1"]
[tool.tox.env."py314-django6.0"]
deps = [
{ replace = "ref", of = ["tool", "tox", "env_run_base", "deps"], extend = true },
"Django>=5.1,<5.2",
"Django>=6.0,<6.1",
]

[tool.tox.env.lint]
Expand Down Expand Up @@ -233,3 +213,11 @@ deps = [
commands = [
["mypy", { replace = "posargs", default = ["src/webmention", "tests"], extend = true }],
]

[tool.tox-gh-actions.python]
"3.9" = "py39-django4.2"
"3.10" = "py310-django4.2, py310-django5.2"
"3.11" = "py311-django4.2, py311-django5.2"
"3.12" = "py312-django4.2, py312-django5.2, py312-django6.0"
"3.13" = "py313-django5.2, py313-django6.0"
"3.14" = "py314-django5.2, py314-django6.0"
1 change: 0 additions & 1 deletion src/webmention/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from . import views


app_name = "webmention"


Expand Down