diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..70e25cf --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,25 @@ +name: check + +on: + - push + - pull_request + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.8', '3.9', '3.10', '3.11'] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install tox tox-gh-actions + - name: Test with tox + run: tox diff --git a/README.md b/README.md index b68ca90..c6bd6b2 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ # Django Queries Count +[![PyPI version](https://badge.fury.io/py/django-query-counter.svg)](https://badge.fury.io/py/django-query-counter) +![PyPI - Python Version](https://img.shields.io/pypi/pyversions/django-query-counter) +![PyPI - Versions from Framework Classifiers](https://img.shields.io/pypi/frameworkversions/django/django-query-counter) + + The difference between this project and all the others like it is that I needed to debug management command in Django, but all the others only provided middleware, which did not solve my problem. diff --git a/pyproject.toml b/pyproject.toml index 3e0f6b6..b08b030 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,6 +8,7 @@ legacy_tox_ini = """ py311-django{42, 41} py310-django{42, 41, 40, 32} py39-django{42, 41, 40, 32} + py38-django{42, 41, 40, 32} [testenv] deps = @@ -21,11 +22,25 @@ legacy_tox_ini = """ PYTHONDEVMODE = 1 commands = pytest -Wa -r {posargs:.} + [gh-actions] + python = + 3.8: py38 + 3.9: py39 + 3.10: py310 + 3.11: py311 + + [gh-actions:env] + DJANGO = + 3.2: dj32 + 4.0: dj40 + 4.1: dj41 + 4.2: dj42 + [testenv:lint] description = run linters skip_install = true deps = - ruff==0.0.275 + ruff==0.1.5 commands = ruff {posargs:query_counter} """ diff --git a/setup.py b/setup.py index 7b230bf..0093545 100644 --- a/setup.py +++ b/setup.py @@ -29,8 +29,19 @@ def read_long_description(): 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', - 'Programming Language :: Python', - 'Framework :: Django', 'Topic :: Utilities', + 'Framework :: Django', + 'Framework :: Django :: 3.2', + 'Framework :: Django :: 4.0', + 'Framework :: Django :: 4.1', + 'Framework :: Django :: 4.2', + 'Framework :: Django :: 5.0', + 'Programming Language :: Python', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', ], )