Skip to content

Commit 754dcfa

Browse files
committed
add black, move setup.cfg -> pyproject.toml, separate out lint task, update CI matrix
1 parent fb17dfd commit 754dcfa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+12709
-7295
lines changed

.github/workflows/lint.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: lint
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
jobs:
6+
7+
static-analysis:
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
# run static analysis on bleeding and trailing edges
12+
python-version: [ '3.8', '3.12' ]
13+
django-version:
14+
- '3.2' # LTS April 2024
15+
- '4.2' # LTS April 2026
16+
- '5.0' # April 2025
17+
exclude:
18+
- python-version: '3.8'
19+
django-version: '5.0'
20+
- python-version: '3.12'
21+
django-version: '3.2'
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
- name: Set up Python ${{ matrix.python-version }}
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: ${{ matrix.python-version }}
29+
30+
- name: Install Poetry
31+
uses: snok/install-poetry@v1
32+
with:
33+
virtualenvs-create: true
34+
virtualenvs-in-project: true
35+
- name: Install Dependencies
36+
run: |
37+
poetry config virtualenvs.in-project true
38+
poetry run pip install --upgrade pip
39+
poetry install -E all
40+
poetry run pip install -U "Django~=${{ matrix.django-version }}"
41+
- name: Run Static Analysis
42+
run: |
43+
poetry run isort django_typer --check
44+
poetry run black django_typer --check
45+
poetry run pylint django_enum
46+
poetry run mypy django_enum
47+
poetry check
48+
poetry run pip check
49+
poetry run safety check --full-report
50+
poetry run python -m readme_renderer ./README.rst -o /tmp/README.html
51+
cd ./doc
52+
poetry run doc8 --ignore-path build --max-line-length 100

0 commit comments

Comments
 (0)