File tree Expand file tree Collapse file tree 4 files changed +21
-9
lines changed Expand file tree Collapse file tree 4 files changed +21
-9
lines changed Original file line number Diff line number Diff line change 23
23
with :
24
24
python-version : ${{ matrix.python-version }}
25
25
- name : Install python prerequisites
26
- run : pip install -U --user pip setuptools setuptools-scm flake8
26
+ run : pip install -U --user pip setuptools setuptools-scm nox
27
27
- name : Lint
28
- run : python -m flake8 .
28
+ run : python -m nox --non-interactive --session validate-${{ matrix.python-version }} -k flake8
Original file line number Diff line number Diff line change 23
23
with :
24
24
python-version : ${{ matrix.python-version }}
25
25
- name : Install python prerequisites
26
- run : pip install -U --user pip setuptools setuptools-scm mypy
26
+ run : pip install -U --user pip setuptools setuptools-scm nox
27
27
- name : MyPy
28
- run : python -m mypy cmd2
28
+ run : python -m nox --non-interactive --session validate-${{ matrix.python-version }} -k mypy # Run nox for mypy
Original file line number Diff line number Diff line change @@ -39,3 +39,10 @@ def tests(session, plugin):
39
39
'--no-pty' ,
40
40
'--append-cov' ,
41
41
)
42
+
43
+
44
+ @nox .session (python = ['3.8' , '3.9' ])
45
+ @nox .parametrize ('step' , ['mypy' , 'flake8' ])
46
+ def validate (session , step ):
47
+ session .install ('invoke' , './[validate]' )
48
+ session .run ('invoke' , step )
Original file line number Diff line number Diff line change 66
66
],
67
67
# development only dependencies: install with 'pip install -e .[dev]'
68
68
'dev' : [
69
- "pytest>=4.6" ,
70
69
'codecov' ,
70
+ 'doc8' ,
71
+ 'flake8' ,
72
+ 'invoke' ,
73
+ 'mypy==0.902' ,
74
+ 'nox' ,
75
+ "pytest>=4.6" ,
71
76
'pytest-cov' ,
72
77
'pytest-mock' ,
73
- 'nox' ,
74
- 'flake8' ,
75
78
'sphinx' ,
76
79
'sphinx-rtd-theme' ,
77
80
'sphinx-autobuild' ,
78
- 'doc8' ,
79
- 'invoke' ,
80
81
'twine>=1.11' ,
81
82
],
83
+ 'validate' : [
84
+ 'flake8' ,
85
+ 'mypy==0.902' ,
86
+ ],
82
87
}
83
88
84
89
PACKAGE_DATA = {
You can’t perform that action at this time.
0 commit comments