diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 318ae2b9..a1177a35 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -39,14 +39,8 @@ jobs: strategy: fail-fast: false matrix: - python-version: [ "3.6", "3.7", "3.8", "3.9", "3.10" ] - django-version: [ "2.2", "3.0", "3.1", "3.2", "4.0" ] - exclude: - # Django v4 drops Python 3.6/3.7 support - - django-version: 4.0 - python-version: 3.7 - - django-version: 4.0 - python-version: 3.6 + python-version: [ "3.6", "3.7", "3.8" , "3.9", "3.10" ] + django-version: [ "2.2", "3.0", "3.1", "3.2" ] steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 @@ -56,7 +50,7 @@ jobs: id: poetry-cache with: path: ~/.local - key: key-0 + key: key-1 - name: Install poetry uses: snok/install-poetry@v1 with: @@ -66,7 +60,7 @@ jobs: id: cache-venv with: path: .venv - key: ${{ hashFiles('**/poetry.lock') }}-0 + key: ${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}-1 - run: | pip install virtualenv virtualenv .venv @@ -74,14 +68,16 @@ jobs: pip install pip setuptools wheel -U poetry install --no-interaction --no-root if: steps.cache-venv.outputs.cache-hit != 'true' - - run: | + - name: Install django version + run: | source .venv/bin/activate pip install "Django==${{ matrix.django-version }}" + - run: | + source .venv/bin/activate + pip install coverage[toml] - name: Install DRF 3.11 on Django 2.2 if: matrix.django-version == '2.2' run: pip install "djangorestframework==3.11.1" - - run: pip install coverage - if: matrix.python-version == '3.10' - name: Run tests run: | source .venv/bin/activate diff --git a/poetry.lock b/poetry.lock index 08e54d9d..3d515f2d 100644 --- a/poetry.lock +++ b/poetry.lock @@ -595,15 +595,16 @@ testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xm [[package]] name = "pytest-cov" -version = "3.0.0" +version = "2.12.1" description = "Pytest plugin for measuring coverage." category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [package.dependencies] -coverage = {version = ">=5.2.1", extras = ["toml"]} +coverage = ">=5.2.1" pytest = ">=4.6" +toml = "*" [package.extras] testing = ["fields", "hunter", "process-tests", "six", "pytest-xdist", "virtualenv"] @@ -733,11 +734,11 @@ python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" [[package]] name = "tomli" -version = "2.0.0" +version = "1.2.3" description = "A lil' TOML parser" category = "dev" optional = false -python-versions = ">=3.7" +python-versions = ">=3.6" [[package]] name = "typed-ast" @@ -820,7 +821,7 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytes [metadata] lock-version = "1.1" python-versions = ">=3.6.1,<4.0.0" -content-hash = "68e0aee3f72602a716897c05bf47d966ddd398a37683e2161ccbedc0779359b1" +content-hash = "5c32e31364487abee8d2d7e5e0cda2ea7c0c7b8864959b15fd484994ee84c51c" [metadata.files] asgiref = [ @@ -1180,8 +1181,8 @@ pytest = [ {file = "pytest-6.2.5.tar.gz", hash = "sha256:131b36680866a76e6781d13f101efb86cf674ebb9762eb70d3082b6f29889e89"}, ] pytest-cov = [ - {file = "pytest-cov-3.0.0.tar.gz", hash = "sha256:e7f0f5b1617d2210a2cabc266dfe2f4c75a8d32fb89eafb7ad9d06f6d076d470"}, - {file = "pytest_cov-3.0.0-py3-none-any.whl", hash = "sha256:578d5d15ac4a25e5f961c938b85a05b09fdaae9deef3bb6de9a6e766622ca7a6"}, + {file = "pytest-cov-2.12.1.tar.gz", hash = "sha256:261ceeb8c227b726249b376b8526b600f38667ee314f910353fa318caa01f4d7"}, + {file = "pytest_cov-2.12.1-py2.py3-none-any.whl", hash = "sha256:261bb9e47e65bd099c89c3edf92972865210c36813f80ede5277dceb77a4a62a"}, ] pytest-django = [ {file = "pytest-django-4.5.2.tar.gz", hash = "sha256:d9076f759bb7c36939dbdd5ae6633c18edfc2902d1a69fdbefd2426b970ce6c2"}, @@ -1286,8 +1287,8 @@ toml = [ {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, ] tomli = [ - {file = "tomli-2.0.0-py3-none-any.whl", hash = "sha256:b5bde28da1fed24b9bd1d4d2b8cba62300bfb4ec9a6187a957e8ddb9434c5224"}, - {file = "tomli-2.0.0.tar.gz", hash = "sha256:c292c34f58502a1eb2bbb9f5bbc9a5ebc37bee10ffb8c2d6bbdfa8eb13cc14e1"}, + {file = "tomli-1.2.3-py3-none-any.whl", hash = "sha256:e3069e4be3ead9668e21cb9b074cd948f7b3113fd9c8bba083f48247aab8b11c"}, + {file = "tomli-1.2.3.tar.gz", hash = "sha256:05b6166bff487dc068d322585c7ea4ef78deed501cc124060e0f238e89a9231f"}, ] typed-ast = [ {file = "typed_ast-1.5.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5d8314c92414ce7481eee7ad42b353943679cf6f30237b5ecbf7d835519e1212"}, diff --git a/pyproject.toml b/pyproject.toml index b58ba058..958f03ef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,12 +41,12 @@ packages = [ ] [tool.poetry.dependencies] +python = ">=3.6.1,<4.0.0" djangorestframework = "*" -django = "^2.2 || ^3.0 || ^4.0" +django = "^2.2 || ^3.0" inflection = "*" openapi-spec-validator = "*" prance = "*" -python = ">=3.6.1,<4.0.0" pyYAML = "*" [tool.poetry.dev-dependencies] @@ -55,10 +55,10 @@ drf-yasg = "*" Faker = "*" pre-commit = "*" pytest = "*" -pytest-cov = "*" pytest-django = "*" pylint = "*" -coverage = { extras = ["toml"], version = "^6.1.1", python = "3.10" } +coverage = { extras = ["toml"], version = "^6"} +pytest-cov = "^2" [tool.black] line-length = 120 diff --git a/test_project/settings.py b/test_project/settings.py index 4385023e..587a2390 100644 --- a/test_project/settings.py +++ b/test_project/settings.py @@ -75,7 +75,6 @@ LANGUAGE_CODE = "en" TIME_ZONE = "UTC" USE_I18N = True -USE_L10N = True USE_TZ = True STATIC_URL = "/test_project/static/" STATIC_ROOT = os.path.join(BASE_DIR, "static")