2018-12-14 21:33:52 +00:00
|
|
|
version: 2.1
|
2019-03-12 19:31:28 +00:00
|
|
|
orbs:
|
|
|
|
codecov: codecov/codecov@1.0.4
|
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
|
|
|
- pipenv_install_36
|
2019-05-06 11:42:17 +00:00
|
|
|
- basics:
|
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
|
|
|
- pipenv_install_36
|
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
|
|
|
- pipenv_install_36
|
2018-12-06 01:44:25 +00:00
|
|
|
- character:
|
2018-12-01 21:44:26 +00:00
|
|
|
context: "NuCypher Tests"
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
|
|
|
requires:
|
2019-05-06 11:42:17 +00:00
|
|
|
- basics
|
2018-12-06 01:44:25 +00:00
|
|
|
- network
|
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:
|
2019-05-06 12:56:44 +00:00
|
|
|
- basics
|
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)
|
2019-05-06 10:58:25 +00:00
|
|
|
# - pip_install_36
|
2019-02-06 23:46:25 +00:00
|
|
|
- pipenv_install_36
|
2019-05-06 10:58:25 +00:00
|
|
|
# - pip_install_37
|
|
|
|
# - pipenv_install_37
|
2019-02-06 23:46:25 +00:00
|
|
|
# - 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:
|
2019-05-06 12:56:44 +00:00
|
|
|
- basics
|
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
|
|
|
- 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
|
|
|
|
- character
|
2019-03-06 21:18:51 +00:00
|
|
|
- finnegans_wake_demo:
|
|
|
|
context: "NuCypher Tests"
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
|
|
|
requires:
|
|
|
|
- cli
|
2019-02-07 11:08:41 +00:00
|
|
|
- heartbeat_demo:
|
|
|
|
context: "NuCypher Tests"
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
|
|
|
requires:
|
|
|
|
- cli
|
2019-05-06 10:57:28 +00:00
|
|
|
# - mypy: # Disable mypy for the moment as it was wasting a CircleCI container for nothing
|
|
|
|
# context: "NuCypher Tests"
|
|
|
|
# filters:
|
|
|
|
# tags:
|
|
|
|
# only: /.*/
|
|
|
|
# requires:
|
|
|
|
# - cli
|
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
|
2019-01-30 01:20:15 +00:00
|
|
|
- build_docs:
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
|
|
|
requires:
|
|
|
|
- cli
|
2018-12-14 21:33:52 +00:00
|
|
|
- test_build:
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
|
|
|
requires:
|
|
|
|
- cli
|
2019-01-30 01:20:15 +00:00
|
|
|
- build_docs
|
2019-03-06 21:18:51 +00:00
|
|
|
- heartbeat_demo
|
|
|
|
- finnegans_wake_demo
|
2018-12-21 04:09:31 +00:00
|
|
|
- build_docker:
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /v[0-9]+.*/
|
|
|
|
branches:
|
|
|
|
ignore: /.*/
|
|
|
|
requires:
|
2019-03-06 21:18:51 +00:00
|
|
|
- test_build
|
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 16:39:48 +00:00
|
|
|
command: |
|
|
|
|
pipenv sync --dev
|
|
|
|
pipenv uninstall --skip-lock ethpm
|
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:
|
2019-02-13 17:49:49 +00:00
|
|
|
description: "Install NuCypher 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 .
|
2019-02-13 17:49:49 +00:00
|
|
|
- check_nucypher_entrypoints # Ensure Standard Installation Entry-points Work
|
2018-12-01 19:46:26 +00:00
|
|
|
- run:
|
|
|
|
name: Install Python Development Dependencies with Pip
|
2019-02-13 01:04:03 +00:00
|
|
|
command: pip3 install -r dev-requirements.txt --user .
|
2018-12-01 19:46:26 +00:00
|
|
|
- run:
|
|
|
|
name: Install Solidity Compiler
|
2019-03-06 21:18:51 +00:00
|
|
|
command: ./scripts/installation/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
|
|
|
|
2019-03-12 19:31:28 +00:00
|
|
|
codecov:
|
|
|
|
description: "Upload Coverage Report To codecov.io"
|
2018-12-14 21:33:52 +00:00
|
|
|
steps:
|
2019-03-12 19:31:28 +00:00
|
|
|
- codecov/upload:
|
|
|
|
file: reports/coverage.xml
|
2018-12-14 21:33:52 +00:00
|
|
|
|
2018-12-14 23:30:03 +00:00
|
|
|
capture_test_results:
|
|
|
|
description: "Store and Upload test results; Follow-up step for tests"
|
|
|
|
steps:
|
2019-03-12 19:31:28 +00:00
|
|
|
- codecov
|
2018-12-14 23:30:03 +00:00
|
|
|
- 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-11-24 05:13:11 +00:00
|
|
|
agents:
|
2018-06-27 22:28:40 +00:00
|
|
|
<<: *python_36_base
|
2019-05-06 12:56:44 +00:00
|
|
|
parallelism: 6
|
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-04-13 23:56:40 +00:00
|
|
|
pipenv run pytest --cov=nucypher --cov-report xml:reports/coverage.xml $(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-04-13 23:56:40 +00:00
|
|
|
pipenv run pytest --cov=nucypher --cov-report xml:reports/coverage.xml $(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-04-13 23:56:40 +00:00
|
|
|
pipenv run pytest --cov=nucypher --cov-report xml:reports/coverage.xml $(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-04-13 23:56:40 +00:00
|
|
|
pipenv run pytest --cov=nucypher --cov-report xml:reports/coverage.xml $(circleci tests glob "tests/blockchain/eth/contracts/**/test_*.py" | circleci tests split --split-by=timings)
|
2019-04-06 05:12:04 +00:00
|
|
|
- capture_test_results
|
2018-10-10 02:41:28 +00:00
|
|
|
|
2019-05-06 11:42:17 +00:00
|
|
|
basics:
|
2018-10-10 02:41:28 +00:00
|
|
|
<<: *python_36_base
|
2019-05-06 11:47:24 +00:00
|
|
|
parallelism: 1
|
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:
|
2019-05-06 11:42:17 +00:00
|
|
|
name: Tests for Crypto functions, Node Configuration and Keystore
|
2018-11-28 05:24:17 +00:00
|
|
|
command: |
|
2019-05-06 12:56:44 +00:00
|
|
|
pipenv run pytest --cov=nucypher --cov-report xml:reports/coverage.xml $(circleci tests glob "tests/config/**/test_*.py" "tests/crypto/**/test_*.py" "tests/keystore/**/test_*.py" "tests/blockchain/eth/interfaces/*.py" | circleci tests split --split-by=timings)
|
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-04-13 23:56:40 +00:00
|
|
|
pipenv run pytest --cov=nucypher --cov-report xml:reports/coverage.xml $(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-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-05-06 10:49:29 +00:00
|
|
|
pipenv run pytest --cov=nucypher --cov-report xml:reports/coverage.xml $(circleci tests glob "tests/characters/**/test_*.py" "tests/learning/**/test_*.py" | circleci tests split --split-by=timings)
|
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
|
2019-03-06 21:18:51 +00:00
|
|
|
command: ./scripts/demos/run_heartbeat_demo.sh
|
2019-02-07 10:14:54 +00:00
|
|
|
- store_artifacts:
|
|
|
|
path: /tmp/ursulas-logs
|
2019-02-07 09:16:14 +00:00
|
|
|
|
2019-03-06 21:18:51 +00:00
|
|
|
finnegans_wake_demo:
|
|
|
|
<<: *python_36_base
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- pip_install
|
|
|
|
- run:
|
|
|
|
name: Run demo Ursula fleet, Finnegans wake Demo code
|
|
|
|
command: ./scripts/demos/run_finnegans_wake_demo.sh
|
|
|
|
- store_artifacts:
|
|
|
|
path: /tmp/ursulas-logs
|
|
|
|
|
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-04-13 23:56:40 +00:00
|
|
|
pipenv run pytest --cov=nucypher --cov-report xml:reports/coverage.xml $(circleci tests glob "tests/cli/**/test_*.py" | circleci tests split --split-by=timings)
|
2019-04-13 23:02:15 +00:00
|
|
|
- capture_test_results
|
2018-09-01 15:25: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
|
2019-03-13 12:13:18 +00:00
|
|
|
command: pip3 install --user sphinx recommonmark sphinx-rtd-theme aafigure
|
2019-01-30 01:20:15 +00:00
|
|
|
- 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
|