diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4a2cdf20..c0bd3859 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,8 +2,10 @@ name: build on: push: - branches: master - pull_request: + branches: + - master + - fix-ci-actions + pull_request: jobs: sanity: @@ -25,7 +27,7 @@ jobs: - name: Execute tests run: | pip install -U pip poetry tox - poetry install -E for_tests + poetry install export TOXENV=${{ matrix.toxenv }} export PYTHON=${{ matrix.python-version }} @@ -33,13 +35,13 @@ jobs: test: - name: test latest / Django@${{ matrix.django-version }} / Python@${{ matrix.python-version }} + name: test latest / P@${{ matrix.python-version }} / D@${{ matrix.django-version }} runs-on: ubuntu-latest strategy: fail-fast: false matrix: - python-version: [3.8, 3.9, "3.10", "3.11"] - django-version: [-main, "4.0"] + python-version: [3.8, 3.9, "3.10", "3.11", "3.12"] + django-version: [-main, "4.0", "4.1", "4.2"] steps: - uses: actions/checkout@v3 @@ -51,7 +53,9 @@ jobs: - name: Execute tests run: | pip install -U pip poetry tox - poetry install -E for_tests + poetry config virtualenvs.create false + poetry install + pip install pytest # ffs export DJANGO=${{ matrix.django-version }} export PYTHON=${{ matrix.python-version }} @@ -67,7 +71,7 @@ jobs: coveralls --service=github test_deprecated: # testing older versions of python+django - name: test old stuff / Django@${{ matrix.django-version }} / Python@${{ matrix.python-version }} + name: test old stuff / P@${{ matrix.python-version }} / D@${{ matrix.django-version }} runs-on: ubuntu-latest strategy: # TODO: use a YAML anchor - not supported in GitHub actions "yet" fail-fast: false @@ -85,7 +89,8 @@ jobs: - name: Execute tests run: | pip install -U pip poetry tox - poetry install -E for_tests + poetry config virtualenvs.create false + poetry install export DJANGO=${{ matrix.django-version }} export PYTHON=${{ matrix.python-version }} @@ -116,6 +121,6 @@ jobs: - name: Build run: | pip install -U pip poetry tox - poetry install -E for_tests + poetry install ./scripts/build.sh diff --git a/pyproject.toml b/pyproject.toml index 95f29234..7ee3c891 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ readme = "README.rst" description = "A Pylint plugin to help Pylint understand the Django web framework" repository = "https://github.com/PyCQA/pylint-django" authors = ["Carl Crowder "] -classifiers=[ +classifiers = [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", @@ -17,6 +17,7 @@ classifiers=[ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Framework :: Django :: 2.2", "Framework :: Django :: 3", "Framework :: Django :: 3.0", @@ -28,14 +29,14 @@ classifiers=[ "Framework :: Django :: 4.2", "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)", ] -keywords=["pylint", "django", "plugin"] +keywords = ["pylint", "django", "plugin"] packages = [ - { include = "pylint_django/"} + { include = "pylint_django/" } ] include = [ - "LICENSE", - "*.rst", - "*.md" + "LICENSE", + "*.rst", + "*.md" ] exclude = ["**/tests/**", "**/testutils.py", "**/tests.py"] @@ -43,11 +44,10 @@ exclude = ["**/tests/**", "**/testutils.py", "**/tests.py"] python = ">=3.7,<4.0" pylint-plugin-utils = ">=0.8" pylint = ">=2.0,<3" -Django = {version=">=2.2", optional = true} +Django = { version = ">=2.2", optional = true } [tool.poetry.group.dev.dependencies] tox = "^4.5.1" -pytest = "^7.3.1" pylint = ">=2.13" twine = "^4.0.2" wheel = "^0.40.0" @@ -55,6 +55,7 @@ pytest-cov = "^4.0.0" django-tables2 = "^2.6.0" factory-boy = "^3.3.0" django-tastypie = "^0.14.6" +pytest = "^7.3.1" [tool.poetry.extras] with_django = ["Django"] diff --git a/scripts/test.sh b/scripts/test.sh index ca5be46c..1c3a7b21 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -1,2 +1,5 @@ #!/bin/bash +# TODO : find out why tox refuses to install this or install any dev dependencies from poetry :-| +pip install 'pytest>=7.3.1' + python pylint_django/tests/test_func.py -v "$@" diff --git a/tox.ini b/tox.ini index e32a00bd..9a70d9a7 100644 --- a/tox.ini +++ b/tox.ini @@ -8,12 +8,15 @@ envlist = pylint readme py{37,38,39}-django{22,30,31,32} - py{38,39,310,311}-django{40,41,42} + py{38,39,310,311,312}-django{40,41,42} +skipsdist = True requires = pip >=21.0.1 poetry tox + pylint >=2.13,<3 + [testenv] commands = @@ -21,7 +24,7 @@ commands = flake8: flake8 pylint_django/ pylint: pylint --rcfile=tox.ini -d missing-docstring,too-many-branches,too-many-return-statements,too-many-ancestors,fixme --ignore=tests pylint_django readme: bash -c "poetry build && twine check dist/*" - py{37,38,39,310,311}-django{22,30,31,32,40,41,42}: bash scripts/test.sh --cov=pylint_django + py{37,38,39,310,311}-django{22,30,31,32,40,41,42}: bash scripts/test.sh clean: find . -type f -name '*.pyc' -delete clean: find . -type d -name __pycache__ -delete clean: rm -rf build/ .cache/ dist/ .eggs/ pylint_django.egg-info/ .tox/