2018-06-17 01:00:07 +00:00
|
|
|
version: 2.0
|
|
|
|
|
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
test:
|
|
|
|
jobs:
|
2018-06-17 18:32:42 +00:00
|
|
|
- bundle_dependencies-36
|
2018-10-10 02:41:28 +00:00
|
|
|
- eth_contract_unit:
|
2018-07-19 23:04:09 +00:00
|
|
|
requires:
|
|
|
|
- bundle_dependencies-36
|
2018-10-10 02:41:28 +00:00
|
|
|
- config_unit:
|
2018-06-17 01:00:07 +00:00
|
|
|
requires:
|
2018-06-17 18:32:42 +00:00
|
|
|
- bundle_dependencies-36
|
|
|
|
- crypto_unit:
|
|
|
|
requires:
|
2018-10-10 02:41:28 +00:00
|
|
|
- bundle_dependencies-36
|
2018-06-17 18:32:42 +00:00
|
|
|
- network_unit:
|
|
|
|
requires:
|
2018-10-10 02:41:28 +00:00
|
|
|
- bundle_dependencies-36
|
2018-06-17 18:32:42 +00:00
|
|
|
- keystore_unit:
|
|
|
|
requires:
|
2018-10-10 02:41:28 +00:00
|
|
|
- bundle_dependencies-36
|
2018-06-27 22:28:40 +00:00
|
|
|
- blockchain_interface_unit:
|
2018-06-17 18:32:42 +00:00
|
|
|
requires:
|
2018-10-10 02:41:28 +00:00
|
|
|
- bundle_dependencies-36
|
2018-06-17 18:32:42 +00:00
|
|
|
- character:
|
|
|
|
requires:
|
2018-10-10 02:41:28 +00:00
|
|
|
- bundle_dependencies-36
|
2018-06-27 22:28:40 +00:00
|
|
|
- intercontract_integration:
|
|
|
|
requires:
|
|
|
|
- eth_contract_unit
|
2018-10-10 02:41:28 +00:00
|
|
|
- mypy_type_check:
|
|
|
|
requires:
|
|
|
|
- config_unit
|
|
|
|
- crypto_unit
|
|
|
|
- network_unit
|
|
|
|
- keystore_unit
|
|
|
|
- character
|
|
|
|
- cli_tests:
|
2018-09-01 15:25:02 +00:00
|
|
|
requires:
|
2018-10-10 02:41:28 +00:00
|
|
|
- blockchain_interface_unit
|
|
|
|
- config_unit
|
|
|
|
- crypto_unit
|
|
|
|
- network_unit
|
|
|
|
- keystore_unit
|
|
|
|
- character
|
2018-06-17 01:00:07 +00:00
|
|
|
|
2018-06-27 22:28:40 +00:00
|
|
|
python_36_base: &python_36_base
|
2018-06-17 18:32:42 +00:00
|
|
|
working_directory: ~/nucypher-depends
|
|
|
|
docker:
|
|
|
|
- image: circleci/python:3.6
|
|
|
|
|
2018-06-27 22:28:40 +00:00
|
|
|
jobs:
|
|
|
|
bundle_dependencies-36:
|
|
|
|
<<: *python_36_base
|
2018-06-17 18:32:42 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
2018-06-27 22:28:40 +00:00
|
|
|
name: Install Python Dependencies with Pipenv
|
2018-06-17 18:32:42 +00:00
|
|
|
command: |
|
2018-10-10 02:41:28 +00:00
|
|
|
pip3 install --user pip==18.0
|
2018-10-06 06:30:43 +00:00
|
|
|
pipenv install --three --dev --skip-lock --verbose
|
2018-06-27 22:28:40 +00:00
|
|
|
- run:
|
|
|
|
name: Install Solidity Compiler
|
2018-08-11 21:24:58 +00:00
|
|
|
command: pipenv run ./scripts/install_solc.sh
|
2018-08-31 17:20:36 +00:00
|
|
|
- persist_to_workspace:
|
|
|
|
root: ~/.local/share/virtualenvs/
|
2018-06-27 22:28:40 +00:00
|
|
|
paths:
|
2018-08-31 17:20:36 +00:00
|
|
|
- nucypher-*
|
2018-06-17 18:32:42 +00:00
|
|
|
|
2018-06-27 22:28:40 +00:00
|
|
|
blockchain_interface_unit:
|
|
|
|
<<: *python_36_base
|
|
|
|
steps:
|
|
|
|
- checkout
|
2018-08-31 17:20:36 +00:00
|
|
|
- attach_workspace:
|
|
|
|
at: ~/.local/share/virtualenvs/
|
2018-06-27 22:28:40 +00:00
|
|
|
- run:
|
|
|
|
name: Blockchain Interface Tests
|
2018-06-30 07:05:46 +00:00
|
|
|
command: pipenv run pytest --cov=nucypher/blockchain/eth -v --runslow tests/blockchain/eth/interfaces tests/blockchain/eth/entities --junitxml=./reports/pytest/results.xml
|
|
|
|
- store_test_results:
|
|
|
|
path: ./reports/pytest/
|
2018-06-17 01:00:07 +00:00
|
|
|
|
2018-06-27 22:28:40 +00:00
|
|
|
eth_contract_unit:
|
|
|
|
<<: *python_36_base
|
|
|
|
parallelism: 4
|
2018-06-17 18:32:42 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
2018-08-31 17:20:36 +00:00
|
|
|
- attach_workspace:
|
|
|
|
at: ~/.local/share/virtualenvs/
|
2018-06-17 18:32:42 +00:00
|
|
|
- run:
|
2018-06-27 22:28:40 +00:00
|
|
|
name: Ethereum Contract Unit Tests
|
2018-06-17 18:32:42 +00:00
|
|
|
command: |
|
2018-10-10 02:41:28 +00:00
|
|
|
pipenv run pytest --junitxml=./reports/pytest/eth-contract-unit-report.xml -v --runslow $(circleci tests glob tests/blockchain/eth/contracts/**/**/test_*.py | circleci tests split --split-by=timings)
|
|
|
|
- store_test_results:
|
|
|
|
path: ./reports/pytest/
|
|
|
|
|
|
|
|
config_unit:
|
|
|
|
<<: *python_36_base
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- attach_workspace:
|
|
|
|
at: ~/.local/share/virtualenvs/
|
|
|
|
- run:
|
|
|
|
name: Node Configuration Tests
|
|
|
|
command: pipenv run pytest --cov=nucypher/config -v --runslow tests/config --junitxml=./reports/pytest/results.xml
|
2018-06-27 22:28:40 +00:00
|
|
|
- store_test_results:
|
|
|
|
path: ./reports/pytest/
|
2018-06-17 18:32:42 +00:00
|
|
|
|
|
|
|
crypto_unit:
|
2018-06-27 22:28:40 +00:00
|
|
|
<<: *python_36_base
|
2018-06-17 01:00:07 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
2018-08-31 17:20:36 +00:00
|
|
|
- attach_workspace:
|
|
|
|
at: ~/.local/share/virtualenvs/
|
2018-06-17 01:00:07 +00:00
|
|
|
- run:
|
2018-06-17 18:32:42 +00:00
|
|
|
name: Crypto Character Tests
|
2018-06-30 07:05:46 +00:00
|
|
|
command: pipenv run pytest --cov=nucypher/crypto -v --runslow tests/crypto --junitxml=./reports/pytest/results.xml
|
|
|
|
- store_test_results:
|
|
|
|
path: ./reports/pytest/
|
2018-06-17 01:00:07 +00:00
|
|
|
|
2018-06-17 18:32:42 +00:00
|
|
|
network_unit:
|
2018-06-27 22:28:40 +00:00
|
|
|
<<: *python_36_base
|
2018-06-17 01:00:07 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
2018-08-31 17:20:36 +00:00
|
|
|
- attach_workspace:
|
|
|
|
at: ~/.local/share/virtualenvs/
|
2018-06-17 01:00:07 +00:00
|
|
|
- run:
|
2018-06-17 18:32:42 +00:00
|
|
|
name: Network Tests
|
2018-06-30 07:05:46 +00:00
|
|
|
command: pipenv run pytest --cov=nucypher/network -v --runslow tests/network --junitxml=./reports/pytest/results.xml
|
|
|
|
- store_test_results:
|
|
|
|
path: ./reports/pytest/
|
2018-06-17 01:00:07 +00:00
|
|
|
|
2018-06-17 18:32:42 +00:00
|
|
|
keystore_unit:
|
2018-06-27 22:28:40 +00:00
|
|
|
<<: *python_36_base
|
2018-06-17 18:32:42 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
2018-08-31 17:20:36 +00:00
|
|
|
- attach_workspace:
|
|
|
|
at: ~/.local/share/virtualenvs/
|
2018-06-17 18:32:42 +00:00
|
|
|
- run:
|
|
|
|
name: Keystore Tests
|
2018-06-30 07:05:46 +00:00
|
|
|
command: pipenv run pytest --cov=nucypher/keystore -v --runslow tests/keystore --junitxml=./reports/pytest/results.xml
|
|
|
|
- store_test_results:
|
|
|
|
path: ./reports/pytest/
|
2018-06-17 18:32:42 +00:00
|
|
|
|
|
|
|
character:
|
2018-06-27 22:28:40 +00:00
|
|
|
<<: *python_36_base
|
2018-06-17 18:32:42 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
2018-08-31 17:20:36 +00:00
|
|
|
- attach_workspace:
|
|
|
|
at: ~/.local/share/virtualenvs/
|
2018-06-17 18:32:42 +00:00
|
|
|
- run:
|
|
|
|
name: Character Tests
|
2018-07-04 01:02:24 +00:00
|
|
|
command: pipenv run pytest --cov=nucypher -v --runslow tests/characters --junitxml=./reports/pytest/results.xml
|
2018-06-30 07:05:46 +00:00
|
|
|
- store_test_results:
|
|
|
|
path: ./reports/pytest/
|
2018-06-17 18:32:42 +00:00
|
|
|
|
2018-06-27 22:28:40 +00:00
|
|
|
intercontract_integration:
|
|
|
|
<<: *python_36_base
|
2018-06-17 18:32:42 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
2018-08-31 17:20:36 +00:00
|
|
|
- attach_workspace:
|
|
|
|
at: ~/.local/share/virtualenvs/
|
2018-06-17 18:32:42 +00:00
|
|
|
- run:
|
2018-06-27 22:28:40 +00:00
|
|
|
name: Ethereum Inter-Contract Integration Test
|
2018-06-17 18:32:42 +00:00
|
|
|
command: |
|
2018-08-31 22:41:58 +00:00
|
|
|
pipenv run pytest -v --runslow tests/blockchain/eth/contracts/main/test_intercontract_integration.py --junitxml=./reports/pytest/results.xml
|
2018-06-30 07:05:46 +00:00
|
|
|
- store_test_results:
|
|
|
|
path: ./reports/pytest/
|
2018-07-19 23:04:09 +00:00
|
|
|
|
2018-10-10 02:41:28 +00:00
|
|
|
cli_tests:
|
2018-09-01 15:25:02 +00:00
|
|
|
<<: *python_36_base
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- attach_workspace:
|
|
|
|
at: ~/.local/share/virtualenvs/
|
|
|
|
- run:
|
|
|
|
name: Nucypher CLI Tests
|
|
|
|
command: |
|
|
|
|
pipenv run pytest -v --runslow tests/cli --junitxml=./reports/pytest/results.xml
|
|
|
|
- store_test_results:
|
|
|
|
path: ./reports/pytest/
|
|
|
|
|
2018-07-19 23:04:09 +00:00
|
|
|
mypy_type_check:
|
|
|
|
<<: *python_36_base
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- attach_workspace:
|
|
|
|
at: ~/.local/share/virtualenvs/
|
2018-09-18 16:01:00 +00:00
|
|
|
- run:
|
|
|
|
name: Install lxml
|
|
|
|
command: |
|
|
|
|
pipenv run pip install lxml
|
2018-07-19 23:04:09 +00:00
|
|
|
- run:
|
2018-10-10 02:41:28 +00:00
|
|
|
name: Run Mypy Static Type Checks (Always Succeed)
|
2018-07-19 23:04:09 +00:00
|
|
|
command: |
|
|
|
|
mkdir ./mypy_reports ./mypy_results
|
|
|
|
export MYPYPATH=./nucypher
|
2018-09-23 04:15:55 +00:00
|
|
|
pipenv run mypy ./nucypher --config-file=mypy.ini --xslt-html-report ./mypy_reports/html/ --linecount-report ./mypy_reports/linecount --junit-xml ./mypy_results/results.xml || true
|
2018-07-19 23:04:09 +00:00
|
|
|
- store_artifacts:
|
|
|
|
path: ./mypy_reports
|
|
|
|
- store_test_results:
|
|
|
|
path: ./mypy_results
|