From f4420ef98ad09e6462c8efe1591cf55df3b76eba Mon Sep 17 00:00:00 2001 From: Keri Date: Wed, 8 Jan 2020 16:49:06 -0700 Subject: [PATCH] Add wheel-cli tests to circle and tox --- .circleci/config.yml | 30 +++++++++++++++++++++++++++--- tox.ini | 31 +++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 950c4df199..4523622ac4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -264,6 +264,12 @@ jobs: environment: TOXENV: py36-integration-ethtester ETHEREUM_TESTER_CHAIN_BACKEND: eth_tester.backends.PyEVMBackend + py36-wheel-cli: + <<: *common + docker: + - image: circleci/python:3.6 + environment: + TOXENV: py36-wheel-cli # # Python 3.7 # @@ -372,6 +378,12 @@ jobs: environment: TOXENV: py37-integration-ethtester ETHEREUM_TESTER_CHAIN_BACKEND: eth_tester.backends.PyEVMBackend + py37-wheel-cli: + <<: *common + docker: + - image: circleci/python:3.7 + environment: + TOXENV: py37-wheel-cli # # Python 3.8 # @@ -481,13 +493,24 @@ jobs: TOXENV: py38-integration-ethtester ETHEREUM_TESTER_CHAIN_BACKEND: eth_tester.backends.PyEVMBackend + py38-wheel-cli: + <<: *common + docker: + - image: circleci/python:3.8 + environment: + TOXENV: py38-wheel-cli + workflows: version: 2 test: jobs: + # These are the longest running tests, start them first + - py36-core + - py37-core + - py38-core + - lint - docs - - py36-core - py36-ens - py36-ethpm - py36-integration-goethereum-ipc-1.7.2 @@ -500,7 +523,7 @@ workflows: - py36-integration-parity-http - py36-integration-parity-ws - py36-integration-ethtester-pyevm - - py37-core + - py36-wheel-cli - py37-ens - py37-ethpm - py37-integration-goethereum-ipc-1.7.2 @@ -513,7 +536,7 @@ workflows: - py37-integration-parity-http - py37-integration-parity-ws - py37-integration-ethtester-pyevm - - py38-core + - py37-wheel-cli - py38-ens - py38-ethpm - py38-integration-goethereum-ipc-1.7.2 @@ -526,3 +549,4 @@ workflows: - py38-integration-parity-http - py38-integration-parity-ws - py38-integration-ethtester-pyevm + - py38-wheel-cli diff --git a/tox.ini b/tox.ini index 02435d1430..d912eb45ea 100644 --- a/tox.ini +++ b/tox.ini @@ -6,6 +6,7 @@ envlist= py{36,37,38}-integration-{goethereum,ethtester,parity} lint docs + py{36,37,38}-wheel-cli [isort] combine_as_imports=True @@ -24,6 +25,7 @@ max-line-length= 100 exclude= venv*,.tox,docs,build ignore= [testenv] +whitelist_externals=/bin/make install_command=python -m pip install --no-use-pep517 {opts} {packages} usedevelop=True commands= @@ -64,3 +66,32 @@ commands= flake8 {toxinidir}/web3 {toxinidir}/ens {toxinidir}/ethpm {toxinidir}/tests isort --recursive --check-only --diff {toxinidir}/web3/ {toxinidir}/ens/ {toxinidir}/ethpm/ {toxinidir}/tests/ mypy -p web3 -p ethpm -p ens --config-file {toxinidir}/mypy.ini + +[common-wheel-cli] +deps=wheel +whitelist_externals= + /bin/rm + /bin/bash +commands= + /bin/rm -rf build dist + python setup.py sdist bdist_wheel + /bin/bash -c 'pip install --upgrade "$(ls dist/web3-*-py3-none-any.whl)" --progress-bar off' + python -c "from web3.auto import w3" + +[testenv:py36-wheel-cli] +deps={[common-wheel-cli]deps} +whitelist_externals={[common-wheel-cli]whitelist_externals} +commands={[common-wheel-cli]commands} +skip_install=true + +[testenv:py37-wheel-cli] +deps={[common-wheel-cli]deps} +whitelist_externals={[common-wheel-cli]whitelist_externals} +commands={[common-wheel-cli]commands} +skip_install=true + +[testenv:py38-wheel-cli] +deps={[common-wheel-cli]deps} +whitelist_externals={[common-wheel-cli]whitelist_externals} +commands={[common-wheel-cli]commands} +skip_install=true