nucypher/.circleci/config.yml

203 lines
6.0 KiB
YAML
Raw Normal View History

version: 2.0
workflows:
version: 2
test:
jobs:
- bundle_dependencies-36
- eth_contract_unit:
requires:
- bundle_dependencies-36
- config_unit:
requires:
- bundle_dependencies-36
- crypto_unit:
requires:
- bundle_dependencies-36
- network_unit:
requires:
- bundle_dependencies-36
- keystore_unit:
requires:
- bundle_dependencies-36
- blockchain_interface_unit:
requires:
- bundle_dependencies-36
- character:
requires:
- bundle_dependencies-36
- intercontract_integration:
requires:
- eth_contract_unit
- mypy_type_check:
requires:
- config_unit
- crypto_unit
- network_unit
- keystore_unit
- character
- cli_tests:
requires:
- blockchain_interface_unit
- config_unit
- crypto_unit
- network_unit
- keystore_unit
- character
python_36_base: &python_36_base
working_directory: ~/nucypher-depends
docker:
- image: circleci/python:3.6
jobs:
bundle_dependencies-36:
<<: *python_36_base
steps:
- checkout
- run:
name: Install Python Dependencies with Pipenv
command: |
pip3 install --user pip==18.0
pipenv install --three --dev --skip-lock --verbose
- run:
name: Install Solidity Compiler
command: pipenv run ./scripts/install_solc.sh
2018-08-31 17:20:36 +00:00
- persist_to_workspace:
root: ~/.local/share/virtualenvs/
paths:
2018-08-31 17:20:36 +00:00
- nucypher-*
blockchain_interface_unit:
<<: *python_36_base
steps:
- checkout
2018-08-31 17:20:36 +00:00
- attach_workspace:
at: ~/.local/share/virtualenvs/
- 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/
eth_contract_unit:
<<: *python_36_base
parallelism: 4
steps:
- checkout
2018-08-31 17:20:36 +00:00
- attach_workspace:
at: ~/.local/share/virtualenvs/
- run:
name: Ethereum Contract Unit Tests
command: |
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
- store_test_results:
path: ./reports/pytest/
crypto_unit:
<<: *python_36_base
steps:
- checkout
2018-08-31 17:20:36 +00:00
- attach_workspace:
at: ~/.local/share/virtualenvs/
- run:
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/
network_unit:
<<: *python_36_base
steps:
- checkout
2018-08-31 17:20:36 +00:00
- attach_workspace:
at: ~/.local/share/virtualenvs/
- run:
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/
keystore_unit:
<<: *python_36_base
steps:
- checkout
2018-08-31 17:20:36 +00:00
- attach_workspace:
at: ~/.local/share/virtualenvs/
- 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/
character:
<<: *python_36_base
steps:
- checkout
2018-08-31 17:20:36 +00:00
- attach_workspace:
at: ~/.local/share/virtualenvs/
- run:
name: Character Tests
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/
intercontract_integration:
<<: *python_36_base
steps:
- checkout
2018-08-31 17:20:36 +00:00
- attach_workspace:
at: ~/.local/share/virtualenvs/
- run:
name: Ethereum Inter-Contract Integration Test
command: |
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/
cli_tests:
<<: *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/
mypy_type_check:
<<: *python_36_base
steps:
- checkout
- attach_workspace:
at: ~/.local/share/virtualenvs/
- run:
name: Install lxml
command: |
pipenv run pip install lxml
- run:
name: Run Mypy Static Type Checks (Always Succeed)
command: |
mkdir ./mypy_reports ./mypy_results
export MYPYPATH=./nucypher
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
- store_artifacts:
path: ./mypy_reports
- store_test_results:
path: ./mypy_results