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
44 changes: 18 additions & 26 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ jobs:
outputs:
envlist: ${{ steps.generate-tox-envlist.outputs.envlist }}
steps:
- uses: actions/checkout@v3
- run: |
python -m pip install --upgrade pip
python -m pip install tox tox-gh-matrix
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.12
cache: pip
- run: pip install tox tox-gh-matrix
- id: generate-tox-envlist
run: python -m tox --gh-matrix

Expand All @@ -29,7 +31,6 @@ jobs:
fail-fast: false
matrix:
tox: ${{ fromJSON(needs.get-tox-envlist.outputs.envlist) }}

# Service containers to run with `container-job`
services:
# Label used to access the service container
Expand All @@ -45,25 +46,16 @@ jobs:
ports:
# Maps port 6379 on service container to the host
- 6379:6379

steps:
- uses: actions/checkout@v2

- name: Setup Python ${{ matrix.tox.python.version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.tox.python.spec }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade tox

- name: Tox tests
run: python -m tox -v -e ${{ matrix.tox.name }}

- name: Install codecov
run: python -m pip install codecov

- name: Upload coverage
run: python -m codecov --name "Python ${{ matrix.tox.python.spec }}"
- uses: actions/checkout@v4
- name: Setup Python ${{ matrix.tox.python.version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.tox.python.spec }}
cache: pip
- name: Install dependencies
run: pip install tox codecov
- name: Tox tests
run: python -m tox -v -e ${{ matrix.tox.name }}
- name: Upload coverage
run: python -m codecov --name "Python ${{ matrix.tox.python.spec }}"
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ select = [
ignore = [
# `format` will wrap lines.
"E501",
# FIXME: pytest-fixture-no-parentheses
"PT001",
"PT023",
# FIXME: pytest-raises-too-broad
"PT011",
# FIXME: parenthesize-chained-operators
"RUF021",
]

[tool.ruff.lint.isort]
Expand Down
12 changes: 6 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,18 @@ def read(*parts):
description="Python tools and helpers for Mozilla's Dockerflow",
long_description=read("README.rst"),
long_description_content_type="text/x-rst",
author="Mozilla Foundation",
author_email="dev-webdev@lists.mozilla.org",
author="Mozilla Services Engineering",
author_email="services-engineering+code@mozilla.com",
url="https://github.com/mozilla-services/python-dockerflow",
license="MPL 2.0",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment :: Mozilla",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Framework :: Django :: 5.1",
"Framework :: Django :: 5.2",
"Framework :: Flask",
"Framework :: FastAPI",
"Intended Audience :: Developers",
Expand All @@ -44,6 +43,7 @@ def read(*parts):
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Internet :: WWW/HTTP",
],
extras_require={
Expand All @@ -53,5 +53,5 @@ def read(*parts):
"fastapi": ["fastapi", "asgiref"],
},
zip_safe=False,
python_requires=">=3.7,<4",
python_requires=">=3.8,<4",
)
1 change: 0 additions & 1 deletion tests/constraints/django-4.0.txt

This file was deleted.

1 change: 0 additions & 1 deletion tests/constraints/django-4.1.txt

This file was deleted.

1 change: 0 additions & 1 deletion tests/constraints/django-5.0.txt

This file was deleted.

1 change: 1 addition & 0 deletions tests/constraints/django-5.1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Django>=5.1,<5.2
1 change: 1 addition & 0 deletions tests/constraints/django-5.2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Django>=5.2,<5.3
21 changes: 11 additions & 10 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ envlist =
py38-lint
py311-docs
py{38,39,310}-dj32
py{38,39,310,311}-dj{40,41,42}
py{310,311,312}-dj{50}
py{38,39,310,311,312}-fa100
py{38,39,310,311}-fl{20,21,22,23,30}
py{38,39,310,311}-s{21,22,23}
py{38,39,310,311,312}-dj42
py{310,311,312,313}-dj{51,52}
py{38,39,310,311,312,313}-fa100
py{38,39,310,311}-fl{20,21,22}
py{38,39,310,311,312}-fl{23,30}
py{38,39,310,311}-s{21,22}
py{38,39,310,311,312,313}-s23

[testenv]
usedevelop = true
Expand All @@ -19,15 +21,14 @@ setenv =
PYTHONPATH = {toxinidir}
deps =
-rtests/requirements/default.txt
dj{32,40,41,42,50}: -rtests/requirements/django.txt
dj{32,42,51,52}: -rtests/requirements/django.txt
fa100: -rtests/requirements/fastapi.txt
fl{20,21,22,23,30}: -rtests/requirements/flask.txt
s{21,22,23}: -rtests/requirements/sanic.txt
dj32: -ctests/constraints/django-3.2.txt
dj40: -ctests/constraints/django-4.0.txt
dj41: -ctests/constraints/django-4.1.txt
dj42: -ctests/constraints/django-4.2.txt
dj50: -ctests/constraints/django-5.0.txt
dj51: -ctests/constraints/django-5.1.txt
dj52: -ctests/constraints/django-5.2.txt
fa100: -ctests/constraints/fastapi-0.100.txt
fl20: -ctests/constraints/flask-2.0.txt
fl21: -ctests/constraints/flask-2.1.txt
Expand All @@ -39,7 +40,7 @@ deps =
s23: -ctests/constraints/sanic-23.txt
commands =
python --version
dj{32,40,41,42,50}: pytest --no-migrations -o DJANGO_SETTINGS_MODULE=tests.django.settings -o django_find_project=false {posargs:tests/core/ tests/django}
dj{32,42,51,52}: pytest --no-migrations -o DJANGO_SETTINGS_MODULE=tests.django.settings -o django_find_project=false {posargs:tests/core/ tests/django}
fa{100}: pytest {posargs: tests/core/ tests/fastapi/}
fl{20,21,22,23,30}: pytest {posargs:tests/core/ tests/flask/}
s{21,22,23}: pytest {posargs:tests/core/ tests/sanic/}
Expand Down