Skip to content

Commit 4291ea6

Browse files
committed
Add lint CI jobs for all supported python versions
1 parent 100c8c7 commit 4291ea6

File tree

2 files changed

+52
-12
lines changed

2 files changed

+52
-12
lines changed

.circleci/config.yml

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -207,13 +207,6 @@ windows_steps: &windows_steps
207207

208208

209209
jobs:
210-
lint:
211-
<<: *common
212-
docker:
213-
- image: cimg/python:3.9
214-
environment:
215-
TOXENV: lint
216-
217210
docs:
218211
<<: *docs_steps
219212
docker:
@@ -225,6 +218,13 @@ jobs:
225218
#
226219
# Python 3.7
227220
#
221+
py37-lint:
222+
<<: *common
223+
docker:
224+
- image: cimg/python:3.7
225+
environment:
226+
TOXENV: py37-lint
227+
228228
py37-core:
229229
<<: *common
230230
docker:
@@ -327,6 +327,13 @@ jobs:
327327
#
328328
# Python 3.8
329329
#
330+
py38-lint:
331+
<<: *common
332+
docker:
333+
- image: cimg/python:3.8
334+
environment:
335+
TOXENV: py38-lint
336+
330337
py38-core:
331338
<<: *common
332339
docker:
@@ -424,6 +431,13 @@ jobs:
424431
#
425432
# Python 3.9
426433
#
434+
py39-lint:
435+
<<: *common
436+
docker:
437+
- image: cimg/python:3.9
438+
environment:
439+
TOXENV: py39-lint
440+
427441
py39-core:
428442
<<: *common
429443
docker:
@@ -521,6 +535,13 @@ jobs:
521535
#
522536
# Python 3.10
523537
#
538+
py310-lint:
539+
<<: *common
540+
docker:
541+
- image: cimg/python:3.10
542+
environment:
543+
TOXENV: py310-lint
544+
524545
py310-core:
525546
<<: *common
526547
docker:
@@ -618,6 +639,13 @@ jobs:
618639
#
619640
# Python 3.11
620641
#
642+
py311-lint:
643+
<<: *common
644+
docker:
645+
- image: cimg/python:3.11
646+
environment:
647+
TOXENV: py311-lint
648+
621649
py311-core:
622650
<<: *common
623651
docker:
@@ -730,9 +758,9 @@ workflows:
730758
- py39-core
731759
- py310-core
732760
- py311-core
733-
- lint
734761
- docs
735762
- benchmark
763+
- py37-lint
736764
- py37-ens
737765
- py37-ethpm
738766
- py37-integration-goethereum-ipc
@@ -745,6 +773,7 @@ workflows:
745773
- py37-integration-ethtester-pyevm
746774
- py37-wheel-cli
747775
- py37-wheel-cli-windows
776+
- py38-lint
748777
- py38-ens
749778
- py38-ethpm
750779
- py38-integration-goethereum-ipc
@@ -756,6 +785,7 @@ workflows:
756785
- py38-integration-goethereum-ws_flaky
757786
- py38-integration-ethtester-pyevm
758787
- py38-wheel-cli
788+
- py39-lint
759789
- py39-ens
760790
- py39-ethpm
761791
- py39-integration-goethereum-ipc
@@ -767,6 +797,7 @@ workflows:
767797
- py39-integration-goethereum-ws_flaky
768798
- py39-integration-ethtester-pyevm
769799
- py39-wheel-cli
800+
- py310-lint
770801
- py310-ens
771802
- py310-ethpm
772803
- py310-integration-goethereum-ipc
@@ -778,6 +809,7 @@ workflows:
778809
- py310-integration-goethereum-ws_flaky
779810
- py310-integration-ethtester-pyevm
780811
- py310-wheel-cli
812+
- py311-lint
781813
- py311-ens
782814
- py311-ethpm
783815
- py311-integration-goethereum-ipc

tox.ini

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ envlist=
44
py{37,38,39,310,311}-ethpm
55
py{37,38,39,310,311}-core
66
py{37,38,39,310,311}-integration-{goethereum,ethtester}
7-
lint
7+
py{37,38,39,310,311}-lint
8+
py{37,38,39,310,311}-wheel-cli
89
docs
910
benchmark
10-
py{37,38,39,310,311}-wheel-cli
1111

1212
[flake8]
1313
max-line-length=88
@@ -48,15 +48,23 @@ basepython =
4848
py310: python3.10
4949
py311: python3.11
5050

51-
[testenv:lint]
52-
basepython=python
51+
[common-lint]
5352
extras=linter
5453
commands=
5554
flake8 {toxinidir}/web3 {toxinidir}/ens {toxinidir}/ethpm {toxinidir}/tests --exclude {toxinidir}/ethpm/ethpm-spec,{toxinidir}/**/*_pb2.py
5655
black {toxinidir}/ens {toxinidir}/ethpm {toxinidir}/web3 {toxinidir}/tests {toxinidir}/setup.py --exclude /ethpm/ethpm-spec/|/ethpm/_utils/protobuf/ipfs_file_pb2\.py --check
5756
isort --check-only --diff {toxinidir}/web3/ {toxinidir}/ens/ {toxinidir}/ethpm/ {toxinidir}/tests/
5857
mypy -p web3 -p ethpm -p ens --config-file {toxinidir}/mypy.ini
5958

59+
[testenv:lint]
60+
basepython: python
61+
extras: {[common-lint]extras}
62+
commands: {[common-lint]commands}
63+
64+
[testenv:py{36,37,38,39}-lint]
65+
extras: {[common-lint]extras}
66+
commands: {[common-lint]commands}
67+
6068
[testenv:benchmark]
6169
basepython=python
6270
commands=

0 commit comments

Comments
 (0)