Skip to content

Commit 23f8e97

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

File tree

2 files changed

+51
-12
lines changed

2 files changed

+51
-12
lines changed

.circleci/config.yml

Lines changed: 39 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,7 +758,6 @@ workflows:
730758
- py39-core
731759
- py310-core
732760
- py311-core
733-
- lint
734761
- docs
735762
- benchmark
736763
- py37-ens
@@ -745,6 +772,7 @@ workflows:
745772
- py37-integration-ethtester-pyevm
746773
- py37-wheel-cli
747774
- py37-wheel-cli-windows
775+
- py38-lint
748776
- py38-ens
749777
- py38-ethpm
750778
- py38-integration-goethereum-ipc
@@ -756,6 +784,7 @@ workflows:
756784
- py38-integration-goethereum-ws_flaky
757785
- py38-integration-ethtester-pyevm
758786
- py38-wheel-cli
787+
- py39-lint
759788
- py39-ens
760789
- py39-ethpm
761790
- py39-integration-goethereum-ipc
@@ -767,6 +796,7 @@ workflows:
767796
- py39-integration-goethereum-ws_flaky
768797
- py39-integration-ethtester-pyevm
769798
- py39-wheel-cli
799+
- py310-lint
770800
- py310-ens
771801
- py310-ethpm
772802
- py310-integration-goethereum-ipc
@@ -778,6 +808,7 @@ workflows:
778808
- py310-integration-goethereum-ws_flaky
779809
- py310-integration-ethtester-pyevm
780810
- py310-wheel-cli
811+
- py311-lint
781812
- py311-ens
782813
- py311-ethpm
783814
- 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{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{38,39,310,311}-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)