Skip to content

Commit

Permalink
Fixing up last pieces of tox config and testing
Browse files Browse the repository at this point in the history
  • Loading branch information
carl-tstpd committed May 15, 2023
1 parent 82f64c6 commit 054b49a
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 1,484 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/build.yml
Expand Up @@ -12,20 +12,20 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.6]
toxenv: [django_not_installed, django_is_installed, flake8, pylint, readme]
python-version: [3.7]
toxenv: [django_not_installed, flake8, pylint, readme]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Execute tests
run: |
pip install tox
pip install -e .[for_tests]
pip install -U pip poetry tox
poetry install -E for_tests
export TOXENV=${{ matrix.toxenv }}
export PYTHON=${{ matrix.python-version }}
Expand All @@ -42,16 +42,16 @@ jobs:
django-version: [-main, "4.0"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Execute tests
run: |
pip install tox
pip install -e .[for_tests]
pip install -U pip poetry tox
poetry install -E for_tests
export DJANGO=${{ matrix.django-version }}
export PYTHON=${{ matrix.python-version }}
Expand All @@ -76,16 +76,16 @@ jobs:
django-version: [3.2, 3.1, "3.0", "2.0", "2.2", "1.11"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Execute tests
run: |
pip install tox
pip install -e .[for_tests]
pip install -U pip poetry tox
poetry install -E for_tests
export DJANGO=${{ matrix.django-version }}
export PYTHON=${{ matrix.python-version }}
Expand All @@ -107,15 +107,15 @@ jobs:
python-version: [3.7]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Build
run: |
pip install tox
pip install -e .[for_tests]
pip install -U pip poetry tox
poetry install -E for_tests
./scripts/build.sh
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -37,3 +37,5 @@ nosetests.xml
.idea
env.txt
.venv

poetry.lock
2 changes: 1 addition & 1 deletion README.rst
Expand Up @@ -32,7 +32,7 @@ this causes more trouble than good,
`see discussion <https://github.com/PyCQA/pylint-django/pull/132>`__. If you wish
to automatically install the latest version of ``Django`` then::

pip install pylint-django[with_django]
pip install pylint-django[with-django]

otherwise sort out your testing environment and please **DO NOT** report issues
about missing Django!
Expand Down
4 changes: 0 additions & 4 deletions SECURITY.md
Expand Up @@ -12,7 +12,3 @@ In case you have found a security problem with pylint-django *DO NOT* report
it into GitHub Issues. Instead go to
[https://tidelift.com/security](https://tidelift.com/security)
and follow the instructions there.

At least one of the package maintainers ([@atodorov](http://github.com/atodorov))
is a lifter at Tidelift and will be notified when you report the security
problem with them!
1,451 changes: 0 additions & 1,451 deletions poetry.lock

This file was deleted.

2 changes: 1 addition & 1 deletion pylint_django/tests/input/migrations/0002_new_column.txt
@@ -1 +1 @@
new-db-field-with-default:29:8:33:9:Migration:pylint_django.tests.input.migrations.0002_new_column AddField with default value:UNDEFINED
new-db-field-with-default:28:8:32:9:Migration:pylint_django.tests.input.migrations.0002_new_column AddField with default value:UNDEFINED
@@ -1,4 +1,4 @@
missing-backwards-migration-callable:12:8:12:30:Migration:Always include backwards migration callable:UNDEFINED
missing-backwards-migration-callable:13:8:13:43:Migration:Always include backwards migration callable:UNDEFINED
missing-backwards-migration-callable:14:8:14:48:Migration:Always include backwards migration callable:UNDEFINED
missing-backwards-migration-callable:15:8:15:62:Migration:Always include backwards migration callable:UNDEFINED
missing-backwards-migration-callable:11:8:11:30:Migration:Always include backwards migration callable:UNDEFINED
missing-backwards-migration-callable:12:8:12:43:Migration:Always include backwards migration callable:UNDEFINED
missing-backwards-migration-callable:13:8:13:48:Migration:Always include backwards migration callable:UNDEFINED
missing-backwards-migration-callable:14:8:14:62:Migration:Always include backwards migration callable:UNDEFINED
2 changes: 1 addition & 1 deletion pylint_django/tests/test_django_not_installed.sh
@@ -1,2 +1,2 @@
#!/bin/bash
pylint --rcfile=tox.ini --load-plugins=pylint_django setup.py | grep django-not-configured
pylint --rcfile=tox.ini --load-plugins=pylint_django pylint_django/ | grep django-not-available
2 changes: 1 addition & 1 deletion scripts/build.sh
Expand Up @@ -68,7 +68,7 @@ echo "..... Trying to install the new tarball inside a virtualenv"
# note: installs with the optional dependency to verify this is still working
virtualenv .venv/test-tarball
source .venv/test-tarball/bin/activate
pip install -f dist/ pylint_django[with_django]
pip install -f dist/ pylint_django[with-django]
pip freeze | grep Django
deactivate
rm -rf .venv/
Expand Down
4 changes: 1 addition & 3 deletions tox.ini
Expand Up @@ -4,7 +4,6 @@
[tox]
envlist =
django_not_installed
django_is_installed
flake8
pylint
readme
Expand All @@ -13,12 +12,12 @@ envlist =

requires =
pip >=21.0.1
poetry
tox

[testenv]
commands =
django_not_installed: bash pylint_django/tests/test_django_not_installed.sh
django_is_installed: pylint --rcfile=tox.ini --load-plugins=pylint_django --disable=E5110 setup.py
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/*"
Expand All @@ -27,7 +26,6 @@ commands =
clean: find . -type d -name __pycache__ -delete
clean: rm -rf build/ .cache/ dist/ .eggs/ pylint_django.egg-info/ .tox/
deps =
django_is_installed: Django
flake8: flake8
pylint: pylint
pylint: Django
Expand Down

0 comments on commit 054b49a

Please sign in to comment.