mirror of
https://github.com/jazzband/django-fernet-encrypted-fields.git
synced 2026-03-16 22:40:27 +00:00
Fix github workflow
This commit is contained in:
parent
f54b18e9f2
commit
b14cb14938
3 changed files with 39 additions and 17 deletions
29
.github/workflows/lint-and-test.yml
vendored
29
.github/workflows/lint-and-test.yml
vendored
|
|
@ -13,14 +13,11 @@ jobs:
|
|||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install flake8 black
|
||||
pip install ruff black
|
||||
|
||||
- name: Lint with flake8
|
||||
- name: Lint with Ruff
|
||||
run: |
|
||||
# stop the build if there are Python syntax errors or undefined names
|
||||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
||||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
||||
ruff check .
|
||||
|
||||
- name: Lint with Black
|
||||
run: |
|
||||
|
|
@ -29,12 +26,11 @@ jobs:
|
|||
test:
|
||||
strategy:
|
||||
matrix:
|
||||
python_version: 3.8, 3.9, '3.10']
|
||||
django_version: [3.2, 4.0, 4.1.0, 4.2.2]
|
||||
python_version: ['3.10', 3.11, 3.12]
|
||||
django_version: [3.2, 4.0, 4.1.0, 4.2.2, 5.0, 5.1.4]
|
||||
exclude:
|
||||
# Ignore Django 4 on Python 3.7
|
||||
- python_version: 3.8
|
||||
django_version: 4.2.2
|
||||
- python_version: 3.12
|
||||
django_version: 3.2
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
|
@ -49,7 +45,7 @@ jobs:
|
|||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -q Django==${{ matrix.django_version }}
|
||||
pip install coverage
|
||||
pip install coverage pytest
|
||||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
||||
|
||||
- name: Run tests
|
||||
|
|
@ -57,7 +53,8 @@ jobs:
|
|||
coverage3 run --source='./encrypted_fields' manage.py test
|
||||
coverage xml
|
||||
|
||||
- name: "Upload coverage to Codecov"
|
||||
uses: codecov/codecov-action@v2
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
# - name: "Upload coverage to Artifact"
|
||||
# uses: actions/upload-artifact@v4
|
||||
# with:
|
||||
# name: coverage
|
||||
# path: coverage.xml
|
||||
|
|
|
|||
25
pyproject.toml
Normal file
25
pyproject.toml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
##################
|
||||
# ruff
|
||||
##################
|
||||
[tool.ruff]
|
||||
fix = true
|
||||
lint.fixable = ["ALL"]
|
||||
lint.ignore = ["A003", "COM812", "D", "DJ008", "ERA001", "ISC001", "PLC2401", "PLC2403", "PT011", "RUF001", "S101", "S105", "S608", "SIM103", "TC001", "TC002", "TC003", "UP040"]
|
||||
lint.select = ["ALL"]
|
||||
lint.unfixable = ["ERA001", "F401"]
|
||||
include = ["encrypted_fields/*.py", "package_test/*.py"]
|
||||
target-version = "py312"
|
||||
|
||||
##################
|
||||
# mypy
|
||||
##################
|
||||
[tool.mypy]
|
||||
mypy_path = "$MYPY_CONFIG_FILE_DIR"
|
||||
packages = ["encrypted_fields"]
|
||||
python_version = "3.12"
|
||||
|
||||
strict = true
|
||||
warn_unreachable = true
|
||||
warn_no_return = true
|
||||
ignore_missing_imports = true
|
||||
disallow_untyped_decorators = false
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
cffi==1.14.6
|
||||
cryptography==35.0.0
|
||||
pycparser==2.20
|
||||
Django>=2.2
|
||||
Django>=3.2
|
||||
|
|
|
|||
Loading…
Reference in a new issue