chore: upgrade dependencies
Also remove coverage run, as we don't really use it in this lib anyway.
This commit is contained in:
1 parent
9deac1d813
commit
b1f1ba62bb
7 files changed
+22
-66
No files matched your search
@@ -1,4 +0,0 @@
|
|||||||
coverage:
|
|
||||||
status:
|
|
||||||
project: off
|
|
||||||
patch: off
|
|
||||||
@@ -33,7 +33,7 @@ jobs:
|
|||||||
name: Build with Python ${{ matrix.python-version }}
|
name: Build with Python ${{ matrix.python-version }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v6
|
||||||
# Fetch all tags and branches because tests rely on it
|
# Fetch all tags and branches because tests rely on it
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
@@ -42,7 +42,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: python -m pip install tox==4.6.3 tox-gh-actions
|
run: python -m pip install tox==4.30.3 tox-gh-actions
|
||||||
- name: Test with tox ${{ matrix.python-version }}
|
- name: Test with tox ${{ matrix.python-version }}
|
||||||
run: tox
|
run: tox
|
||||||
|
|
||||||
@@ -51,51 +51,14 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v6
|
||||||
- name: Set up Python 3.12
|
- name: Set up Python 3.13
|
||||||
uses: actions/setup-python@v6
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: '3.12'
|
python-version: '3.13'
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: python -m pip install tox==4.24.1
|
run: python -m pip install tox==4.30.3
|
||||||
- name: Lint with tox
|
- name: Lint with tox
|
||||||
run: tox
|
run: tox
|
||||||
env:
|
env:
|
||||||
TOXENV: lint
|
TOXENV: lint
|
||||||
|
|
||||||
coverage:
|
|
||||||
name: Generate coverage
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
services:
|
|
||||||
postgres:
|
|
||||||
image: postgres
|
|
||||||
env:
|
|
||||||
POSTGRES_PASSWORD: postgres
|
|
||||||
ports:
|
|
||||||
- 5432:5432
|
|
||||||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
|
||||||
|
|
||||||
mysql:
|
|
||||||
image: mysql:8.0
|
|
||||||
env:
|
|
||||||
MYSQL_ALLOW_EMPTY_PASSWORD: yes
|
|
||||||
ports:
|
|
||||||
- 3306:3306
|
|
||||||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v5
|
|
||||||
# Fetch all tags and branches because tests rely on it
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: Set up Python 3.12
|
|
||||||
uses: actions/setup-python@v6
|
|
||||||
with:
|
|
||||||
python-version: '3.12'
|
|
||||||
- name: Install dependencies and coverage
|
|
||||||
run: python -m pip install tox==4.24.1
|
|
||||||
- name: Test with tox with coverage
|
|
||||||
run: tox
|
|
||||||
env:
|
|
||||||
TOXENV: coverage
|
|
||||||
+10
-7
@@ -1,6 +1,6 @@
|
|||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v5.0.0
|
rev: v6.0.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: check-added-large-files
|
- id: check-added-large-files
|
||||||
- id: check-ast
|
- id: check-ast
|
||||||
@@ -14,20 +14,20 @@ repos:
|
|||||||
- id: forbid-submodules
|
- id: forbid-submodules
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
- repo: https://github.com/psf/black
|
- repo: https://github.com/psf/black
|
||||||
rev: 25.1.0
|
rev: 25.11.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
- repo: https://github.com/PyCQA/flake8
|
- repo: https://github.com/PyCQA/flake8
|
||||||
rev: 7.2.0
|
rev: 7.3.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: flake8
|
- id: flake8
|
||||||
exclude: ^tests/
|
exclude: ^tests/
|
||||||
- repo: https://github.com/pycqa/isort
|
- repo: https://github.com/pycqa/isort
|
||||||
rev: 6.0.1
|
rev: 7.0.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: isort
|
- id: isort
|
||||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||||
rev: v1.15.0
|
rev: v1.19.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: mypy
|
- id: mypy
|
||||||
additional_dependencies:
|
additional_dependencies:
|
||||||
@@ -36,9 +36,12 @@ repos:
|
|||||||
- "--ignore-missing-imports"
|
- "--ignore-missing-imports"
|
||||||
exclude: ^tests/
|
exclude: ^tests/
|
||||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||||
rev: v0.11.2
|
rev: v0.14.7
|
||||||
hooks:
|
hooks:
|
||||||
- id: ruff
|
- id: ruff-check
|
||||||
args:
|
args:
|
||||||
- "--line-length=88"
|
- "--line-length=88"
|
||||||
|
- "--fix"
|
||||||
|
exclude: ^tests/
|
||||||
|
- id: ruff-format
|
||||||
exclude: ^tests/
|
exclude: ^tests/
|
||||||
@@ -11,6 +11,7 @@ Miscellaneous:
|
|||||||
- Add py.typed file (#303)
|
- Add py.typed file (#303)
|
||||||
- Add support for Django 5.2 (#304)
|
- Add support for Django 5.2 (#304)
|
||||||
- Add support for Python 3.14
|
- Add support for Python 3.14
|
||||||
|
- Remove coverage from CI
|
||||||
|
|
||||||
## 5.2.0
|
## 5.2.0
|
||||||
|
|
||||||
|
|||||||
+1
-2
@@ -58,11 +58,10 @@ django_migration_linter = ['py.typed']
|
|||||||
|
|
||||||
[project.optional-dependencies]
|
[project.optional-dependencies]
|
||||||
test = [
|
test = [
|
||||||
"tox>=4.6.3",
|
"tox>=4.30.3",
|
||||||
"mysqlclient>=2.1.1",
|
"mysqlclient>=2.1.1",
|
||||||
"psycopg2>=2.9.6",
|
"psycopg2>=2.9.6",
|
||||||
"django_add_default_value>=0.4.0",
|
"django_add_default_value>=0.4.0",
|
||||||
"coverage>=7.2.7",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.isort]
|
[tool.isort]
|
||||||
|
|||||||
@@ -415,7 +415,8 @@ class MigrationLinter:
|
|||||||
|
|
||||||
migrations = []
|
migrations = []
|
||||||
for line in map(
|
for line in map(
|
||||||
clean_bytes_to_str, diff_process.stdout.readlines() # type: ignore
|
clean_bytes_to_str,
|
||||||
|
diff_process.stdout.readlines(), # type: ignore
|
||||||
):
|
):
|
||||||
# Only gather lines that include added migrations.
|
# Only gather lines that include added migrations.
|
||||||
if self.is_migration_file(line):
|
if self.is_migration_file(line):
|
||||||
@@ -455,7 +456,8 @@ class MigrationLinter:
|
|||||||
if diff_process.returncode != 0:
|
if diff_process.returncode != 0:
|
||||||
output = []
|
output = []
|
||||||
for line in map(
|
for line in map(
|
||||||
clean_bytes_to_str, diff_process.stderr.readlines() # type: ignore
|
clean_bytes_to_str,
|
||||||
|
diff_process.stderr.readlines(), # type: ignore
|
||||||
):
|
):
|
||||||
output.append(line)
|
output.append(line)
|
||||||
logger.error("Error while git diff command:\n{}".format("".join(output)))
|
logger.error("Error while git diff command:\n{}".format("".join(output)))
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ envlist =
|
|||||||
py{310,311,312,313}-django51
|
py{310,311,312,313}-django51
|
||||||
py{310,311,312,313,314}-django52
|
py{310,311,312,313,314}-django52
|
||||||
lint
|
lint
|
||||||
coverage
|
|
||||||
|
|
||||||
[gh-actions]
|
[gh-actions]
|
||||||
python =
|
python =
|
||||||
@@ -39,13 +38,6 @@ basepython = python3.12
|
|||||||
deps = pre-commit
|
deps = pre-commit
|
||||||
commands = pre-commit run --all-files --show-diff-on-failure
|
commands = pre-commit run --all-files --show-diff-on-failure
|
||||||
|
|
||||||
[testenv:coverage]
|
|
||||||
commands =
|
|
||||||
coverage run manage.py test --no-input {posargs}
|
|
||||||
coverage xml -i
|
|
||||||
extras = test
|
|
||||||
pip_pre = true
|
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
max-line-length=88
|
max-line-length=88
|
||||||
ignore=E203,W503
|
ignore=E203,W503
|
||||||
Reference in new issue
Block a user