2018-12-14 21:33:52 +00:00
|
|
|
version: 2.1
|
2018-06-17 01:00:07 +00:00
|
|
|
|
|
|
|
workflows:
|
|
|
|
version: 2
|
2019-02-01 16:17:12 +00:00
|
|
|
test_build_deploy:
|
2018-06-17 01:00:07 +00:00
|
|
|
jobs:
|
2018-12-14 21:33:52 +00:00
|
|
|
- pipenv_install_36:
|
2018-12-01 19:46:26 +00:00
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2018-12-14 21:33:52 +00:00
|
|
|
- pip_install_36:
|
2018-11-04 17:11:51 +00:00
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2018-12-14 21:33:52 +00:00
|
|
|
- pipenv_install_37:
|
2018-11-24 05:13:11 +00:00
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2018-12-14 21:33:52 +00:00
|
|
|
- pip_install_37:
|
2018-11-04 17:11:51 +00:00
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2018-12-14 21:33:52 +00:00
|
|
|
- contracts:
|
2018-12-01 20:14:52 +00:00
|
|
|
context: "NuCypher Tests"
|
2018-11-04 17:11:51 +00:00
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2018-06-17 01:00:07 +00:00
|
|
|
requires:
|
2018-12-14 21:33:52 +00:00
|
|
|
- pip_install_36
|
|
|
|
- pipenv_install_36
|
|
|
|
- pip_install_37
|
|
|
|
- pipenv_install_37
|
2018-11-24 02:04:02 +00:00
|
|
|
- crypto:
|
2018-12-01 20:14:52 +00:00
|
|
|
context: "NuCypher Tests"
|
2018-11-04 17:11:51 +00:00
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2018-06-17 18:32:42 +00:00
|
|
|
requires:
|
2018-12-14 21:33:52 +00:00
|
|
|
- pip_install_36
|
|
|
|
- pipenv_install_36
|
|
|
|
- pip_install_37
|
|
|
|
- pipenv_install_37
|
2018-11-24 02:04:02 +00:00
|
|
|
- network:
|
2018-12-01 20:14:52 +00:00
|
|
|
context: "NuCypher Tests"
|
2018-11-04 17:11:51 +00:00
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2018-06-17 18:32:42 +00:00
|
|
|
requires:
|
2018-12-14 21:33:52 +00:00
|
|
|
- pip_install_36
|
|
|
|
- pipenv_install_36
|
|
|
|
- pip_install_37
|
|
|
|
- pipenv_install_37
|
2018-11-24 02:04:02 +00:00
|
|
|
- keystore:
|
2018-12-01 20:14:52 +00:00
|
|
|
context: "NuCypher Tests"
|
2018-11-04 17:11:51 +00:00
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2018-06-17 18:32:42 +00:00
|
|
|
requires:
|
2018-12-14 21:33:52 +00:00
|
|
|
- pip_install_36
|
|
|
|
- pipenv_install_36
|
|
|
|
- pip_install_37
|
|
|
|
- pipenv_install_37
|
2018-12-06 02:15:51 +00:00
|
|
|
- blockchain:
|
2018-12-01 20:14:52 +00:00
|
|
|
context: "NuCypher Tests"
|
2018-11-04 17:11:51 +00:00
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2018-06-17 18:32:42 +00:00
|
|
|
requires:
|
2018-12-14 21:33:52 +00:00
|
|
|
- pip_install_36
|
|
|
|
- pipenv_install_36
|
|
|
|
- pip_install_37
|
|
|
|
- pipenv_install_37
|
2018-12-06 01:44:25 +00:00
|
|
|
- character:
|
2018-12-01 21:44:26 +00:00
|
|
|
context: "NuCypher Tests"
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
|
|
|
requires:
|
2018-12-06 01:44:25 +00:00
|
|
|
- crypto
|
|
|
|
- network
|
|
|
|
- keystore
|
2018-11-24 05:13:11 +00:00
|
|
|
- agents:
|
2018-12-01 20:14:52 +00:00
|
|
|
context: "NuCypher Tests"
|
2018-11-04 17:11:51 +00:00
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2018-06-17 18:32:42 +00:00
|
|
|
requires:
|
2018-12-06 02:15:51 +00:00
|
|
|
- blockchain
|
2019-02-06 23:15:12 +00:00
|
|
|
# - contracts (Removed dependency to speed up overall workflow execution)
|
2018-11-24 05:13:11 +00:00
|
|
|
- actors:
|
2018-12-01 20:14:52 +00:00
|
|
|
context: "NuCypher Tests"
|
2018-11-04 17:11:51 +00:00
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2019-02-06 23:46:25 +00:00
|
|
|
requires: # (Prioritizing this task given that it's awfully slow)
|
|
|
|
- pip_install_36
|
|
|
|
- pipenv_install_36
|
|
|
|
- pip_install_37
|
|
|
|
- pipenv_install_37
|
|
|
|
# - blockchain
|
|
|
|
# - contracts
|
2018-11-24 05:13:11 +00:00
|
|
|
- deployers:
|
|
|
|
context: "NuCypher Tests"
|
2018-11-04 17:11:51 +00:00
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2018-10-10 02:41:28 +00:00
|
|
|
requires:
|
2018-12-06 02:15:51 +00:00
|
|
|
- blockchain
|
2019-02-06 23:15:12 +00:00
|
|
|
# - contracts (Removed dependency to speed up overall workflow execution)
|
2018-11-24 05:13:11 +00:00
|
|
|
- config:
|
2018-12-01 20:53:00 +00:00
|
|
|
context: "NuCypher Tests"
|
2018-11-04 17:11:51 +00:00
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2018-09-01 15:25:02 +00:00
|
|
|
requires:
|
2018-12-06 02:15:51 +00:00
|
|
|
- blockchain
|
2018-11-24 02:04:02 +00:00
|
|
|
- crypto
|
|
|
|
- network
|
|
|
|
- keystore
|
2018-11-24 05:13:11 +00:00
|
|
|
- cli:
|
2018-11-24 02:04:02 +00:00
|
|
|
context: "NuCypher Tests"
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
|
|
|
requires:
|
2018-12-14 21:33:52 +00:00
|
|
|
- agents
|
2018-11-24 05:13:11 +00:00
|
|
|
- actors
|
|
|
|
- deployers
|
|
|
|
- config
|
|
|
|
- character
|
|
|
|
- ursula_command:
|
|
|
|
context: "NuCypher Tests"
|
2018-11-24 02:20:06 +00:00
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
|
|
|
requires:
|
2018-12-14 21:33:52 +00:00
|
|
|
- agents
|
2018-11-24 05:13:11 +00:00
|
|
|
- actors
|
|
|
|
- deployers
|
|
|
|
- config
|
|
|
|
- character
|
2019-02-07 11:08:41 +00:00
|
|
|
- heartbeat_demo:
|
|
|
|
context: "NuCypher Tests"
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
|
|
|
requires:
|
|
|
|
- cli
|
|
|
|
- ursula_command
|
2018-12-14 21:33:52 +00:00
|
|
|
- mypy:
|
|
|
|
context: "NuCypher Tests"
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
|
|
|
requires:
|
|
|
|
- cli
|
|
|
|
- ursula_command
|
2018-12-13 22:56:16 +00:00
|
|
|
- estimate_gas:
|
|
|
|
context: "NuCypher Tests"
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
|
|
|
requires:
|
2018-12-14 21:33:52 +00:00
|
|
|
- cli
|
|
|
|
- ursula_command
|
2019-01-30 01:20:15 +00:00
|
|
|
- build_docs:
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
|
|
|
requires:
|
|
|
|
- cli
|
|
|
|
- ursula_command
|
2018-12-14 21:33:52 +00:00
|
|
|
- test_build:
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
|
|
|
requires:
|
|
|
|
- cli
|
|
|
|
- ursula_command
|
2019-01-30 01:20:15 +00:00
|
|
|
- build_docs
|
2018-12-21 04:09:31 +00:00
|
|
|
- build_docker:
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /v[0-9]+.*/
|
|
|
|
branches:
|
|
|
|
ignore: /.*/
|
|
|
|
requires:
|
|
|
|
- cli
|
|
|
|
- ursula_command
|
2018-12-14 21:33:52 +00:00
|
|
|
- test_deploy:
|
|
|
|
context: "NuCypher PyPI"
|
|
|
|
requires:
|
|
|
|
- test_build
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /v[0-9]+.*/
|
|
|
|
branches:
|
|
|
|
ignore: /.*/
|
|
|
|
- request_publication_approval:
|
|
|
|
type: approval
|
|
|
|
requires:
|
|
|
|
- test_deploy
|
2018-12-21 04:09:31 +00:00
|
|
|
- build_docker
|
2018-12-14 21:33:52 +00:00
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /v[0-9]+.*/
|
|
|
|
branches:
|
|
|
|
ignore: /.*/
|
|
|
|
- publish_pypi:
|
|
|
|
context: "NuCypher PyPI"
|
|
|
|
requires:
|
|
|
|
- request_publication_approval
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /v[0-9]+.*/
|
|
|
|
branches:
|
|
|
|
ignore: /.*/
|
|
|
|
- publish_docker:
|
|
|
|
context: "NuCypher Docker"
|
|
|
|
requires:
|
|
|
|
- request_publication_approval
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /v[0-9]+.*/
|
|
|
|
branches:
|
|
|
|
ignore: /.*/
|
2018-06-17 01:00:07 +00:00
|
|
|
|
2018-12-04 07:08:55 +00:00
|
|
|
|
2018-06-27 22:28:40 +00:00
|
|
|
python_36_base: &python_36_base
|
2018-12-14 23:39:59 +00:00
|
|
|
parallelism: 1
|
2018-12-21 04:09:31 +00:00
|
|
|
working_directory: ~/nucypher
|
2018-12-14 23:39:59 +00:00
|
|
|
docker:
|
|
|
|
- image: circleci/python:3.6
|
2018-06-17 18:32:42 +00:00
|
|
|
|
2018-12-14 21:33:52 +00:00
|
|
|
python_37_base: &python_37_base
|
2018-12-14 23:39:59 +00:00
|
|
|
parallelism: 1
|
2018-12-21 04:09:31 +00:00
|
|
|
working_directory: ~/nucypher
|
2018-12-14 23:39:59 +00:00
|
|
|
docker:
|
|
|
|
- image: circleci/python:3.7
|
2018-12-04 07:08:55 +00:00
|
|
|
|
|
|
|
|
2018-12-14 21:33:52 +00:00
|
|
|
commands:
|
|
|
|
|
2018-12-01 19:46:26 +00:00
|
|
|
pipenv_install:
|
2018-12-14 21:33:52 +00:00
|
|
|
description: "Install Python dependencies with Pipenv"
|
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
|
2019-02-10 05:42:33 +00:00
|
|
|
command: pipenv sync --dev
|
2018-06-27 22:28:40 +00:00
|
|
|
- run:
|
2018-12-14 22:23:25 +00:00
|
|
|
name: Install Solidity Compiler (Pipenv Entrypoint)
|
|
|
|
command: pipenv run install-solc
|
|
|
|
- run:
|
|
|
|
name: Check NuCypher Python API Entrypoint
|
|
|
|
command: pipenv run python3 -c "import nucypher; print(nucypher.__version__)"
|
|
|
|
- run:
|
|
|
|
name: Check NuCypher CLI Entrypoint
|
|
|
|
command: pipenv run nucypher --help
|
2018-06-17 18:32:42 +00:00
|
|
|
|
2018-12-15 00:24:56 +00:00
|
|
|
check_nucypher_entrypoints:
|
|
|
|
description: "Ensure both the python API and CLI entrypoints are usable"
|
|
|
|
steps:
|
|
|
|
- run:
|
|
|
|
name: Check NuCypher Python API Entrypoint
|
|
|
|
command: python3 -c "import nucypher; print(nucypher.__version__)"
|
|
|
|
- run:
|
|
|
|
name: Check NuCypher CLI Entrypoint
|
|
|
|
command: |
|
|
|
|
export PATH=~/.local/bin:$PATH
|
|
|
|
source ~/.bashrc
|
|
|
|
nucypher --help
|
|
|
|
|
2018-12-01 19:46:26 +00:00
|
|
|
pip_install:
|
2018-12-14 21:33:52 +00:00
|
|
|
description: "Install Python dependencies with Pip"
|
2018-12-01 19:46:26 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
name: Install Python Dependencies with Pip
|
2018-12-14 22:23:25 +00:00
|
|
|
command: pip3 install --user .
|
2018-12-01 19:46:26 +00:00
|
|
|
- run:
|
|
|
|
name: Install Python Development Dependencies with Pip
|
2019-01-29 18:34:14 +00:00
|
|
|
command: pip3 install --user .[development]
|
2018-12-01 19:46:26 +00:00
|
|
|
- run:
|
|
|
|
name: Install Solidity Compiler
|
|
|
|
command: ./scripts/install_solc.sh
|
2018-12-15 00:24:56 +00:00
|
|
|
- check_nucypher_entrypoints
|
2018-12-01 19:46:26 +00:00
|
|
|
|
2018-12-17 20:32:28 +00:00
|
|
|
prepare_environment:
|
2018-12-14 23:30:03 +00:00
|
|
|
description: "Checkout application code and Attach the Workspace"
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- attach_workspace:
|
|
|
|
at: ~/.local/share/virtualenvs/
|
2019-01-04 23:52:12 +00:00
|
|
|
- run:
|
|
|
|
name: "Create directory for test reports"
|
|
|
|
command: mkdir reports
|
2018-12-14 23:30:03 +00:00
|
|
|
|
2018-12-14 21:33:52 +00:00
|
|
|
coveralls:
|
|
|
|
description: "Upload Coverage Report To Coveralls.io"
|
|
|
|
steps:
|
|
|
|
- run:
|
|
|
|
name: Upload Coverage Report
|
|
|
|
command: |
|
|
|
|
echo -e "COVERALLS_REPO_TOKEN=$COVERALLS_REPO_TOKEN" >> .env
|
|
|
|
pipenv run coveralls
|
|
|
|
|
2018-12-14 23:30:03 +00:00
|
|
|
capture_test_results:
|
|
|
|
description: "Store and Upload test results; Follow-up step for tests"
|
|
|
|
steps:
|
|
|
|
- coveralls
|
|
|
|
- store_test_results:
|
2019-01-04 23:52:12 +00:00
|
|
|
path: reports
|
2018-12-14 23:30:03 +00:00
|
|
|
|
2018-12-14 21:33:52 +00:00
|
|
|
|
|
|
|
jobs:
|
2018-12-14 22:23:25 +00:00
|
|
|
|
|
|
|
# Python 3.6
|
2018-12-14 21:33:52 +00:00
|
|
|
pip_install_36:
|
|
|
|
<<: *python_36_base
|
|
|
|
steps:
|
|
|
|
- pip_install
|
2018-12-14 23:45:33 +00:00
|
|
|
pipenv_install_36:
|
|
|
|
<<: *python_36_base
|
2018-12-14 21:33:52 +00:00
|
|
|
steps:
|
|
|
|
- pipenv_install
|
2018-12-14 23:45:33 +00:00
|
|
|
- persist_to_workspace:
|
|
|
|
root: ~/.local/share/virtualenvs/
|
|
|
|
paths:
|
|
|
|
- nucypher-*
|
|
|
|
|
|
|
|
# Python 3.7
|
2018-12-14 21:33:52 +00:00
|
|
|
pip_install_37:
|
|
|
|
<<: *python_37_base
|
|
|
|
steps:
|
|
|
|
- pip_install
|
2018-12-14 23:45:33 +00:00
|
|
|
pipenv_install_37:
|
|
|
|
<<: *python_37_base
|
|
|
|
steps:
|
|
|
|
- pipenv_install
|
2018-12-14 21:33:52 +00:00
|
|
|
|
2018-12-06 02:15:51 +00:00
|
|
|
blockchain:
|
2018-12-01 21:44:26 +00:00
|
|
|
<<: *python_36_base
|
|
|
|
parallelism: 2
|
|
|
|
steps:
|
2018-12-17 20:32:28 +00:00
|
|
|
- prepare_environment
|
2018-12-01 21:44:26 +00:00
|
|
|
- run:
|
|
|
|
name: Blockchain Interface Tests
|
2019-01-05 00:05:53 +00:00
|
|
|
command: pipenv run pytest tests/blockchain/eth/interfaces
|
2018-12-14 23:30:03 +00:00
|
|
|
- capture_test_results
|
|
|
|
|
2018-11-24 05:13:11 +00:00
|
|
|
agents:
|
2018-06-27 22:28:40 +00:00
|
|
|
<<: *python_36_base
|
2019-02-06 23:15:12 +00:00
|
|
|
parallelism: 4
|
2018-06-27 22:28:40 +00:00
|
|
|
steps:
|
2018-12-17 20:32:28 +00:00
|
|
|
- prepare_environment
|
2018-06-27 22:28:40 +00:00
|
|
|
- run:
|
2018-11-24 05:13:11 +00:00
|
|
|
name: Blockchain Agent Tests
|
2018-12-14 21:56:55 +00:00
|
|
|
command: |
|
2019-01-05 00:05:53 +00:00
|
|
|
pipenv run pytest $(circleci tests glob tests/blockchain/eth/entities/agents/**/*.py | circleci tests split --split-by=timings)
|
2018-12-14 23:30:03 +00:00
|
|
|
- capture_test_results
|
2018-11-24 05:13:11 +00:00
|
|
|
|
|
|
|
actors:
|
|
|
|
<<: *python_36_base
|
2018-12-06 02:15:51 +00:00
|
|
|
parallelism: 2
|
2018-11-24 05:13:11 +00:00
|
|
|
steps:
|
2018-12-17 20:32:28 +00:00
|
|
|
- prepare_environment
|
2018-11-24 05:13:11 +00:00
|
|
|
- run:
|
|
|
|
name: Blockchain Actor Tests
|
2018-12-14 21:56:55 +00:00
|
|
|
command: |
|
2019-01-05 00:05:53 +00:00
|
|
|
pipenv run pytest $(circleci tests glob tests/blockchain/eth/entities/actors/**/*.py | circleci tests split --split-by=timings)
|
2018-12-14 23:30:03 +00:00
|
|
|
- capture_test_results
|
2018-11-24 05:13:11 +00:00
|
|
|
|
|
|
|
deployers:
|
|
|
|
<<: *python_36_base
|
2018-12-06 02:15:51 +00:00
|
|
|
parallelism: 4
|
2018-11-24 05:13:11 +00:00
|
|
|
steps:
|
2018-12-17 20:32:28 +00:00
|
|
|
- prepare_environment
|
2018-11-24 05:13:11 +00:00
|
|
|
- run:
|
|
|
|
name: Contract Deployer Tests
|
2018-12-14 21:56:55 +00:00
|
|
|
command: |
|
2019-01-05 00:05:53 +00:00
|
|
|
pipenv run pytest $(circleci tests glob tests/blockchain/eth/entities/deployers/test_*.py | circleci tests split --split-by=timings)
|
2018-12-14 23:30:03 +00:00
|
|
|
- capture_test_results
|
2018-06-17 01:00:07 +00:00
|
|
|
|
2018-11-24 02:20:06 +00:00
|
|
|
contracts:
|
2018-06-27 22:28:40 +00:00
|
|
|
<<: *python_36_base
|
2018-12-06 02:15:51 +00:00
|
|
|
parallelism: 5
|
2018-06-17 18:32:42 +00:00
|
|
|
steps:
|
2018-12-17 20:32:28 +00:00
|
|
|
- prepare_environment
|
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: |
|
2019-01-05 00:05:53 +00:00
|
|
|
pipenv run pytest $(circleci tests glob tests/blockchain/eth/contracts/**/**/test_*.py | circleci tests split --split-by=timings)
|
2018-10-10 02:41:28 +00:00
|
|
|
- store_test_results:
|
2019-01-04 23:52:12 +00:00
|
|
|
path: reports
|
2018-10-10 02:41:28 +00:00
|
|
|
|
2018-11-24 02:04:02 +00:00
|
|
|
config:
|
2018-10-10 02:41:28 +00:00
|
|
|
<<: *python_36_base
|
2018-12-01 21:08:08 +00:00
|
|
|
parallelism: 2
|
2018-10-10 02:41:28 +00:00
|
|
|
steps:
|
2018-12-17 20:32:28 +00:00
|
|
|
- prepare_environment
|
2018-10-10 02:41:28 +00:00
|
|
|
- run:
|
|
|
|
name: Node Configuration Tests
|
2018-11-28 05:24:17 +00:00
|
|
|
command: |
|
2019-01-05 00:05:53 +00:00
|
|
|
pipenv run pytest $(circleci tests glob tests/config/**/test_*.py | circleci tests split --split-by=timings)
|
2018-12-14 23:30:03 +00:00
|
|
|
- capture_test_results
|
2018-06-17 18:32:42 +00:00
|
|
|
|
2018-11-24 02:04:02 +00:00
|
|
|
crypto:
|
2018-06-27 22:28:40 +00:00
|
|
|
<<: *python_36_base
|
2018-06-17 01:00:07 +00:00
|
|
|
steps:
|
2018-12-17 20:32:28 +00:00
|
|
|
- prepare_environment
|
2018-06-17 01:00:07 +00:00
|
|
|
- run:
|
2018-06-17 18:32:42 +00:00
|
|
|
name: Crypto Character Tests
|
2019-01-05 00:05:53 +00:00
|
|
|
command: pipenv run pytest tests/crypto
|
2019-01-04 23:52:12 +00:00
|
|
|
- capture_test_results
|
2018-06-17 01:00:07 +00:00
|
|
|
|
2018-11-24 02:04:02 +00:00
|
|
|
network:
|
2018-06-27 22:28:40 +00:00
|
|
|
<<: *python_36_base
|
2018-06-17 01:00:07 +00:00
|
|
|
steps:
|
2018-12-17 20:32:28 +00:00
|
|
|
- prepare_environment
|
2018-06-17 01:00:07 +00:00
|
|
|
- run:
|
2018-06-17 18:32:42 +00:00
|
|
|
name: Network Tests
|
2018-11-28 05:24:17 +00:00
|
|
|
command: |
|
2019-01-05 00:05:53 +00:00
|
|
|
pipenv run pytest $(circleci tests glob tests/network/**/test_*.py | circleci tests split --split-by=timings)
|
2018-12-14 23:30:03 +00:00
|
|
|
- capture_test_results
|
2018-06-17 01:00:07 +00:00
|
|
|
|
2018-11-24 02:04:02 +00:00
|
|
|
keystore:
|
2018-06-27 22:28:40 +00:00
|
|
|
<<: *python_36_base
|
2018-12-01 21:08:08 +00:00
|
|
|
parallelism: 2
|
2018-06-17 18:32:42 +00:00
|
|
|
steps:
|
2018-12-17 20:32:28 +00:00
|
|
|
- prepare_environment
|
2018-06-17 18:32:42 +00:00
|
|
|
- run:
|
|
|
|
name: Keystore Tests
|
2018-11-28 05:24:17 +00:00
|
|
|
command: |
|
2019-01-05 00:05:53 +00:00
|
|
|
pipenv run pytest $(circleci tests glob tests/keystore/**/test_*.py | circleci tests split --split-by=timings)
|
2018-12-14 23:30:03 +00:00
|
|
|
- capture_test_results
|
2018-06-17 18:32:42 +00:00
|
|
|
|
|
|
|
character:
|
2018-06-27 22:28:40 +00:00
|
|
|
<<: *python_36_base
|
2018-12-01 21:08:08 +00:00
|
|
|
parallelism: 4
|
2018-06-17 18:32:42 +00:00
|
|
|
steps:
|
2018-12-17 20:32:28 +00:00
|
|
|
- prepare_environment
|
2018-06-17 18:32:42 +00:00
|
|
|
- run:
|
|
|
|
name: Character Tests
|
2018-11-28 05:24:17 +00:00
|
|
|
command: |
|
2019-01-05 00:05:53 +00:00
|
|
|
pipenv run pytest $(circleci tests glob tests/characters/**/test_*.py | circleci tests split --split-by=timings)
|
2018-12-14 23:30:03 +00:00
|
|
|
- capture_test_results
|
2018-06-17 18:32:42 +00:00
|
|
|
|
2018-11-24 02:20:06 +00:00
|
|
|
learning:
|
|
|
|
<<: *python_36_base
|
|
|
|
steps:
|
2018-12-17 20:32:28 +00:00
|
|
|
- prepare_environment
|
2018-11-24 02:20:06 +00:00
|
|
|
- run:
|
|
|
|
name: Learner Tests
|
2019-01-05 00:05:53 +00:00
|
|
|
command: pipenv run pytest tests/learning
|
2018-12-14 23:30:03 +00:00
|
|
|
- capture_test_results
|
2018-11-24 02:20:06 +00:00
|
|
|
|
2019-02-07 09:16:14 +00:00
|
|
|
heartbeat_demo:
|
|
|
|
<<: *python_36_base
|
|
|
|
steps:
|
2019-02-07 10:33:44 +00:00
|
|
|
- checkout
|
|
|
|
- pip_install
|
2019-02-07 09:16:14 +00:00
|
|
|
- run:
|
|
|
|
name: Run demo Ursula fleet, Alicia and the Doctor
|
|
|
|
command: |
|
2019-02-07 10:14:54 +00:00
|
|
|
mkdir /tmp/ursulas-logs
|
2019-02-07 10:33:44 +00:00
|
|
|
export PATH=~/.local/bin:$PATH
|
|
|
|
source ~/.bashrc
|
2019-02-07 10:53:45 +00:00
|
|
|
export NUCYPHER_SENTRY_LOGS=0
|
|
|
|
export NUCYPHER_FILE_LOGS=0
|
|
|
|
python3 examples/run_lonely_demo_ursula.py > /tmp/ursulas-logs/ursula-11500.txt 2>&1 &
|
|
|
|
sleep 15
|
|
|
|
nucypher ursula run --dev --debug --federated-only --teacher-uri localhost:11500 --rest-port 11501 > /tmp/ursulas-logs/ursula-11501.txt 2>&1 &
|
|
|
|
sleep 15
|
|
|
|
nucypher ursula run --dev --debug --federated-only --teacher-uri localhost:11500 --rest-port 11502 > /tmp/ursulas-logs/ursula-11502.txt 2>&1 &
|
|
|
|
sleep 15
|
2019-02-07 10:33:44 +00:00
|
|
|
python3 examples/heartbeat_demo/alicia.py
|
|
|
|
python3 examples/heartbeat_demo/doctor.py
|
2019-02-07 10:14:54 +00:00
|
|
|
- store_artifacts:
|
|
|
|
path: /tmp/ursulas-logs
|
2019-02-07 09:16:14 +00:00
|
|
|
|
2018-11-24 02:20:06 +00:00
|
|
|
cli:
|
2018-09-01 15:25:02 +00:00
|
|
|
<<: *python_36_base
|
2019-02-06 23:15:12 +00:00
|
|
|
parallelism: 6
|
2018-09-01 15:25:02 +00:00
|
|
|
steps:
|
2018-12-17 20:32:28 +00:00
|
|
|
- prepare_environment
|
2018-12-14 23:30:03 +00:00
|
|
|
- run:
|
|
|
|
name: Nucypher CLI Tests
|
|
|
|
command: |
|
2019-01-05 00:05:53 +00:00
|
|
|
pipenv run pytest $(circleci tests glob tests/cli/**/test_*.py | circleci tests split --split-by=timings)
|
2018-12-14 23:30:03 +00:00
|
|
|
- store_test_results:
|
2019-01-04 23:52:12 +00:00
|
|
|
path: reports
|
2018-09-01 15:25:02 +00:00
|
|
|
|
2018-11-24 02:20:06 +00:00
|
|
|
ursula_command:
|
2018-11-24 02:04:02 +00:00
|
|
|
<<: *python_36_base
|
|
|
|
steps:
|
2018-12-17 20:32:28 +00:00
|
|
|
- prepare_environment
|
2018-12-14 23:30:03 +00:00
|
|
|
- run:
|
|
|
|
name: Ursula Command Tests
|
2019-01-05 00:05:53 +00:00
|
|
|
command: pipenv run pytest tests/cli/protocol
|
2018-12-14 23:30:03 +00:00
|
|
|
- store_test_results:
|
2019-01-04 23:52:12 +00:00
|
|
|
path: reports
|
2018-11-24 02:04:02 +00:00
|
|
|
|
2018-11-24 02:20:06 +00:00
|
|
|
mypy:
|
2018-07-19 23:04:09 +00:00
|
|
|
<<: *python_36_base
|
|
|
|
steps:
|
2018-12-17 20:32:28 +00:00
|
|
|
- prepare_environment
|
2018-09-18 16:01:00 +00:00
|
|
|
- run:
|
2018-11-24 02:20:06 +00:00
|
|
|
name: Install mypy
|
2018-09-18 16:01:00 +00:00
|
|
|
command: |
|
|
|
|
pipenv run pip install lxml
|
2018-11-24 02:20:06 +00:00
|
|
|
pipenv run pip install mypy
|
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-12-01 21:08:08 +00:00
|
|
|
pipenv run mypy ./nucypher --config-file=mypy.ini --xslt-html-report ./mypy_reports/html/ --linecount-report ./mypy_reports/linecount || true
|
2018-07-19 23:04:09 +00:00
|
|
|
- store_artifacts:
|
|
|
|
path: ./mypy_reports
|
2018-11-04 17:11:51 +00:00
|
|
|
|
2018-12-13 22:56:16 +00:00
|
|
|
estimate_gas:
|
|
|
|
<<: *python_36_base
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- attach_workspace:
|
|
|
|
at: ~/.local/share/virtualenvs/
|
|
|
|
- run:
|
|
|
|
name: Estimate Gas
|
|
|
|
command: |
|
|
|
|
pipenv run python tests/metrics/estimate_gas.py
|
|
|
|
- store_artifacts:
|
|
|
|
path: tests/metrics/results/
|
|
|
|
|
2019-01-30 01:20:15 +00:00
|
|
|
build_docs:
|
|
|
|
<<: *python_36_base
|
|
|
|
steps:
|
|
|
|
- checkout
|
2019-02-06 23:40:42 +00:00
|
|
|
- attach_workspace:
|
|
|
|
at: ~/.local/share/virtualenvs/
|
2019-01-30 01:20:15 +00:00
|
|
|
- run:
|
|
|
|
name: Install Documentation Build Dependencies
|
|
|
|
command: pip3 install --user sphinx recommonmark sphinx-rtd-theme
|
|
|
|
- run:
|
|
|
|
name: Build Sphinx Documentation
|
|
|
|
command: |
|
|
|
|
cd docs
|
|
|
|
make html
|
2019-02-01 16:06:42 +00:00
|
|
|
- store_artifacts:
|
|
|
|
path: docs/build
|
2019-01-30 01:20:15 +00:00
|
|
|
|
2018-11-24 02:20:06 +00:00
|
|
|
test_build:
|
|
|
|
<<: *python_36_base
|
|
|
|
steps:
|
|
|
|
- checkout
|
2018-12-15 00:24:56 +00:00
|
|
|
- pip_install
|
2018-11-24 02:20:06 +00:00
|
|
|
- run:
|
2018-12-15 00:24:56 +00:00
|
|
|
name: Install Twine
|
|
|
|
command: pip install --user twine
|
2018-11-24 02:20:06 +00:00
|
|
|
- run:
|
2018-12-15 00:24:56 +00:00
|
|
|
name: Build Python Distribution Wheel
|
2018-11-24 02:20:06 +00:00
|
|
|
command: |
|
|
|
|
pipenv run python setup.py sdist
|
2018-12-14 21:56:55 +00:00
|
|
|
pipenv run python setup.py bdist_wheel
|
2018-11-24 02:20:06 +00:00
|
|
|
|
2018-12-21 04:09:31 +00:00
|
|
|
build_docker:
|
2019-01-29 17:22:59 +00:00
|
|
|
working_directory: ~/nucypher
|
2018-12-21 04:09:31 +00:00
|
|
|
docker:
|
2019-01-29 17:22:59 +00:00
|
|
|
- image: docker:18.06.1-ce-git
|
2018-12-21 04:09:31 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- setup_remote_docker
|
|
|
|
- restore_cache:
|
|
|
|
keys:
|
|
|
|
- v1-{{ .Branch }}
|
|
|
|
paths:
|
|
|
|
- ~/docker/nucypher.tar
|
|
|
|
- run:
|
|
|
|
name: Load Docker Image Layer Cache
|
|
|
|
command: |
|
|
|
|
set +o pipefail
|
|
|
|
docker load -i ~/docker/nucypher.tar | true
|
|
|
|
- run:
|
|
|
|
name: Build Docker Image
|
|
|
|
command: |
|
2019-01-29 22:22:13 +00:00
|
|
|
docker build -f deploy/docker/Dockerfile --cache-from=nucypher -t nucypher/nucypher:$CIRCLE_TAG .
|
2018-12-21 04:09:31 +00:00
|
|
|
- run:
|
|
|
|
name: Save Docker Image Layer Cache
|
|
|
|
command: |
|
|
|
|
mkdir -p ~/docker
|
2019-01-29 22:22:13 +00:00
|
|
|
docker save -o ~/docker/nucypher.tar nucypher/nucypher:$CIRCLE_TAG
|
2018-12-21 04:09:31 +00:00
|
|
|
- save_cache:
|
|
|
|
key: v1-{{ .Branch }}-{{ epoch }}
|
|
|
|
paths:
|
|
|
|
- ~/docker/nucypher.tar
|
|
|
|
|
2018-11-04 17:11:51 +00:00
|
|
|
test_deploy:
|
|
|
|
<<: *python_36_base
|
|
|
|
steps:
|
|
|
|
- checkout
|
2018-12-15 00:24:56 +00:00
|
|
|
- pip_install
|
2018-11-04 17:11:51 +00:00
|
|
|
- run:
|
2018-12-15 00:24:56 +00:00
|
|
|
name: Install Twine
|
2019-01-29 18:34:14 +00:00
|
|
|
command: pip3 install --user twine
|
2018-11-04 17:11:51 +00:00
|
|
|
- run:
|
|
|
|
name: Verify git tag == __version__ (Test Deploy)
|
2019-01-29 18:34:14 +00:00
|
|
|
command: python setup.py verify
|
2018-11-04 17:11:51 +00:00
|
|
|
- run:
|
|
|
|
name: Initialize .pypirc (Test Deploy)
|
|
|
|
command: |
|
|
|
|
echo -e "[distutils]" >> ~/.pypirc
|
|
|
|
echo -e "index-servers = " >> ~/.pypirc
|
|
|
|
echo -e " pypi" >> ~/.pypirc
|
|
|
|
echo -e " testpypi" >> ~/.pypirc
|
|
|
|
echo -e "" >> ~/.pypirc
|
|
|
|
echo -e "[testpypi]" >> ~/.pypirc
|
|
|
|
echo -e "repository: https://test.pypi.org/legacy/" >> ~/.pypirc
|
|
|
|
echo -e "username: $TEST_PYPI_USERNAME" >> ~/.pypirc
|
|
|
|
echo -e "password: $TEST_PYPI_PASSWORD" >> ~/.pypirc
|
|
|
|
- run:
|
|
|
|
name: Build Python Wheel (Test Deploy)
|
|
|
|
command: |
|
2019-01-29 18:34:14 +00:00
|
|
|
python3 setup.py sdist
|
|
|
|
python3 setup.py bdist_wheel
|
2018-11-04 17:11:51 +00:00
|
|
|
- run:
|
|
|
|
name: upload to TestPyPI
|
2019-01-29 18:34:14 +00:00
|
|
|
command: python3 -m twine upload --repository testpypi dist/* --verbose
|
2018-11-04 17:11:51 +00:00
|
|
|
- run:
|
|
|
|
name: pip install from TestPyPI
|
|
|
|
command: |
|
2019-01-29 18:34:14 +00:00
|
|
|
pip3 install --user --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple nucypher --verbose
|
|
|
|
python3 -c "import nucypher; print(nucypher.__version__)"
|
2018-11-04 17:11:51 +00:00
|
|
|
|
2018-12-14 21:33:52 +00:00
|
|
|
publish_pypi:
|
2018-11-04 17:11:51 +00:00
|
|
|
<<: *python_36_base
|
|
|
|
steps:
|
|
|
|
- checkout
|
2019-01-29 18:34:14 +00:00
|
|
|
- pip_install
|
2018-11-04 17:11:51 +00:00
|
|
|
- run:
|
2019-01-29 18:34:14 +00:00
|
|
|
name: Install Twine
|
|
|
|
command: pip3 install --user twine
|
2018-11-04 17:11:51 +00:00
|
|
|
- run:
|
|
|
|
name: Verify git tag == __version__
|
2019-01-29 18:34:14 +00:00
|
|
|
command: python3 setup.py verify
|
2018-11-04 17:11:51 +00:00
|
|
|
- run:
|
|
|
|
name: Initialize .pypirc
|
|
|
|
command: |
|
|
|
|
echo -e "[distutils]" >> ~/.pypirc
|
|
|
|
echo -e "index-servers = " >> ~/.pypirc
|
|
|
|
echo -e " pypi" >> ~/.pypirc
|
|
|
|
echo -e "" >> ~/.pypirc
|
|
|
|
echo -e "[pypi]" >> ~/.pypirc
|
|
|
|
echo -e "username = $PYPI_USERNAME" >> ~/.pypirc
|
|
|
|
echo -e "password = $PYPI_PASSWORD" >> ~/.pypirc
|
|
|
|
- run:
|
|
|
|
name: Build Python Wheel
|
|
|
|
command: |
|
2019-01-29 18:34:14 +00:00
|
|
|
python3 setup.py sdist
|
|
|
|
python3 setup.py bdist_wheel
|
2018-12-14 21:33:52 +00:00
|
|
|
- deploy:
|
2018-11-04 17:11:51 +00:00
|
|
|
name: Upload to PyPI
|
2019-01-29 18:34:14 +00:00
|
|
|
command: python3 -m twine upload dist/* --verbose
|
2018-12-14 21:33:52 +00:00
|
|
|
|
|
|
|
publish_docker:
|
2019-01-29 17:22:59 +00:00
|
|
|
working_directory: ~/nucypher
|
2018-12-14 21:33:52 +00:00
|
|
|
docker:
|
2019-01-29 17:22:59 +00:00
|
|
|
- image: docker:18.06.1-ce-git
|
2018-12-14 21:33:52 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
2019-01-29 17:22:59 +00:00
|
|
|
- setup_remote_docker
|
2018-12-14 21:33:52 +00:00
|
|
|
- restore_cache:
|
|
|
|
keys:
|
|
|
|
- v1-{{ .Branch }}
|
|
|
|
paths:
|
2018-12-21 04:09:31 +00:00
|
|
|
- ~/docker/nucypher.tar
|
2018-12-14 21:33:52 +00:00
|
|
|
- run:
|
|
|
|
name: Load Docker Image Layer Cache
|
2018-11-04 17:11:51 +00:00
|
|
|
command: |
|
2018-12-14 21:33:52 +00:00
|
|
|
set +o pipefail
|
2018-12-21 04:09:31 +00:00
|
|
|
docker load -i ~/docker/nucypher.tar | true
|
2018-12-14 21:33:52 +00:00
|
|
|
- deploy:
|
2018-12-21 04:09:31 +00:00
|
|
|
name: Push NuCypher Docker Image
|
2018-12-14 21:33:52 +00:00
|
|
|
command: |
|
2019-01-29 21:49:35 +00:00
|
|
|
echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin
|
|
|
|
docker push nucypher/nucypher:$CIRCLE_TAG
|