2018-06-17 01:00:07 +00:00
|
|
|
version: 2.0
|
|
|
|
|
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
test:
|
|
|
|
jobs:
|
2018-12-01 19:46:26 +00:00
|
|
|
- pipenv_install:
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
|
|
|
- pip_install:
|
2018-11-04 17:11:51 +00:00
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2018-11-24 05:13:11 +00:00
|
|
|
- mypy:
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2018-11-24 02:20:06 +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-07-19 23:04:09 +00:00
|
|
|
requires:
|
2018-12-01 19:46:26 +00:00
|
|
|
- pip_install
|
|
|
|
- pipenv_install
|
2018-12-06 01:44:25 +00:00
|
|
|
- intercontract_integration:
|
|
|
|
context: "NuCypher Tests"
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
|
|
|
requires:
|
|
|
|
- contracts
|
2018-11-24 02:04:02 +00:00
|
|
|
- config:
|
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-11-24 02:20:06 +00:00
|
|
|
- contracts
|
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-01 19:46:26 +00:00
|
|
|
- pip_install
|
|
|
|
- pipenv_install
|
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-01 19:46:26 +00:00
|
|
|
- pip_install
|
|
|
|
- pipenv_install
|
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-01 19:46:26 +00:00
|
|
|
- pip_install
|
|
|
|
- pipenv_install
|
2018-11-24 02:04:02 +00:00
|
|
|
- blockchain_interface:
|
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-01 19:46:26 +00:00
|
|
|
- pip_install
|
|
|
|
- pipenv_install
|
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 01:44:25 +00:00
|
|
|
- intercontract_integration
|
2018-11-24 05:13:11 +00:00
|
|
|
- blockchain_interface
|
|
|
|
- actors:
|
2018-12-01 20:14:52 +00:00
|
|
|
context: "NuCypher Tests"
|
2018-11-04 17:11:51 +00:00
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2018-06-27 22:28:40 +00:00
|
|
|
requires:
|
2018-12-06 01:44:25 +00:00
|
|
|
- intercontract_integration
|
2018-11-24 05:13:11 +00:00
|
|
|
- blockchain_interface
|
|
|
|
- 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-11-24 05:13:11 +00:00
|
|
|
- intercontract_integration
|
|
|
|
- blockchain_interface
|
|
|
|
- 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-11-24 02:04:02 +00:00
|
|
|
- blockchain_interface
|
|
|
|
- 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-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-11-24 05:13:11 +00:00
|
|
|
- actors
|
|
|
|
- deployers
|
|
|
|
- config
|
|
|
|
- character
|
|
|
|
|
|
|
|
#
|
|
|
|
# TODO: Initial Publication Automation
|
|
|
|
#
|
|
|
|
# - test_build:
|
|
|
|
# filters:
|
|
|
|
# tags:
|
|
|
|
# only: /.*/
|
|
|
|
# requires:
|
|
|
|
# - cli
|
|
|
|
# - ursula_command
|
|
|
|
# - test_deploy:
|
|
|
|
# context: "NuCypher PyPI"
|
|
|
|
# requires:
|
|
|
|
# - test_build
|
|
|
|
# filters:
|
|
|
|
# tags:
|
|
|
|
# only: /v[0-9]+.*/
|
|
|
|
# branches:
|
|
|
|
# ignore: /.*/
|
|
|
|
# - request_publication_approval:
|
|
|
|
# type: approval
|
|
|
|
# requires:
|
|
|
|
# - test_deploy
|
|
|
|
# filters:
|
|
|
|
# tags:
|
|
|
|
# only: /v[0-9]+.*/
|
|
|
|
# branches:
|
|
|
|
# ignore: /.*/
|
|
|
|
# - deploy:
|
|
|
|
# context: "NuCypher PyPI"
|
|
|
|
# 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-06-17 18:32:42 +00:00
|
|
|
working_directory: ~/nucypher-depends
|
|
|
|
docker:
|
|
|
|
- image: circleci/python:3.6
|
|
|
|
|
2018-12-04 07:08:55 +00:00
|
|
|
_run:
|
|
|
|
coveralls: &coveralls
|
|
|
|
name: Upload Coverage Report
|
|
|
|
command: |
|
|
|
|
echo -e "COVERALLS_REPO_TOKEN=$COVERALLS_REPO_TOKEN" >> .env
|
|
|
|
pipenv run coveralls
|
|
|
|
|
|
|
|
|
2018-06-27 22:28:40 +00:00
|
|
|
jobs:
|
2018-12-01 19:46:26 +00:00
|
|
|
|
|
|
|
pipenv_install:
|
2018-06-27 22:28:40 +00:00
|
|
|
<<: *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-11-04 17:11:51 +00:00
|
|
|
pipenv install --three --dev --skip-lock --pre
|
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-12-01 19:46:26 +00:00
|
|
|
pip_install:
|
|
|
|
<<: *python_36_base
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
name: Install Python Dependencies with Pip
|
|
|
|
command: |
|
|
|
|
pip3 install --user .
|
|
|
|
- run:
|
|
|
|
name: Install Python Development Dependencies with Pip
|
|
|
|
command: |
|
2018-12-01 22:52:37 +00:00
|
|
|
pip3 install --user .[testing]
|
2018-12-01 19:46:26 +00:00
|
|
|
- run:
|
|
|
|
name: Install Solidity Compiler
|
|
|
|
command: ./scripts/install_solc.sh
|
|
|
|
- run:
|
|
|
|
name: Check Python Entrypoint
|
|
|
|
command: python3 -c "import nucypher; print(nucypher.__version__)"
|
|
|
|
|
2018-11-24 02:04:02 +00:00
|
|
|
blockchain_interface:
|
2018-12-01 21:44:26 +00:00
|
|
|
<<: *python_36_base
|
|
|
|
parallelism: 2
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- attach_workspace:
|
|
|
|
at: ~/.local/share/virtualenvs/
|
|
|
|
- run:
|
|
|
|
name: Blockchain Interface Tests
|
2018-11-24 05:13:11 +00:00
|
|
|
command: pipenv run pytest --cov=nucypher/blockchain/eth -v --runslow tests/blockchain/eth/interfaces --junitxml=./reports/pytest/results.xml
|
2018-12-04 07:08:55 +00:00
|
|
|
- run: *coveralls
|
2018-12-01 21:44:26 +00:00
|
|
|
- store_test_results:
|
|
|
|
path: ./reports/pytest/
|
|
|
|
|
2018-11-24 05:13:11 +00:00
|
|
|
agents:
|
2018-06-27 22:28:40 +00:00
|
|
|
<<: *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:
|
2018-11-24 05:13:11 +00:00
|
|
|
name: Blockchain Agent Tests
|
|
|
|
command: pipenv run pytest --cov=nucypher/blockchain/eth -v --runslow $(circleci tests glob tests/blockchain/eth/entities/agents/**/*.py | circleci tests split --split-by=timings) --junitxml=./reports/pytest/results.xml
|
|
|
|
- run: *coveralls
|
|
|
|
- store_test_results:
|
|
|
|
path: ./reports/pytest/
|
|
|
|
|
|
|
|
actors:
|
|
|
|
<<: *python_36_base
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- attach_workspace:
|
|
|
|
at: ~/.local/share/virtualenvs/
|
|
|
|
- run:
|
|
|
|
name: Blockchain Actor Tests
|
|
|
|
command: pipenv run pytest --cov=nucypher/blockchain/eth -v --runslow $(circleci tests glob tests/blockchain/eth/entities/actors/**/*.py | circleci tests split --split-by=timings) --junitxml=./reports/pytest/results.xml
|
|
|
|
- run: *coveralls
|
|
|
|
- store_test_results:
|
|
|
|
path: ./reports/pytest/
|
|
|
|
|
|
|
|
deployers:
|
|
|
|
<<: *python_36_base
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- attach_workspace:
|
|
|
|
at: ~/.local/share/virtualenvs/
|
|
|
|
- run:
|
|
|
|
name: Contract Deployer Tests
|
|
|
|
command: pipenv run pytest --cov=nucypher/blockchain/eth -v --runslow tests/blockchain/eth/entities/deployers --junitxml=./reports/pytest/results.xml
|
2018-12-04 07:08:55 +00:00
|
|
|
- run: *coveralls
|
2018-06-30 07:05:46 +00:00
|
|
|
- store_test_results:
|
|
|
|
path: ./reports/pytest/
|
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
|
|
|
|
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/
|
|
|
|
|
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:
|
|
|
|
- checkout
|
|
|
|
- attach_workspace:
|
|
|
|
at: ~/.local/share/virtualenvs/
|
|
|
|
- run:
|
|
|
|
name: Node Configuration Tests
|
2018-11-28 05:24:17 +00:00
|
|
|
command: |
|
2018-12-01 21:08:08 +00:00
|
|
|
pipenv run pytest --cov=nucypher/config -v --runslow $(circleci tests glob tests/config/**/test_*.py | circleci tests split --split-by=timings) --junitxml=./reports/pytest/config_results.xml
|
2018-12-04 07:08:55 +00:00
|
|
|
- run: *coveralls
|
2018-06-27 22:28:40 +00:00
|
|
|
- store_test_results:
|
|
|
|
path: ./reports/pytest/
|
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:
|
|
|
|
- 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-11-28 05:24:17 +00:00
|
|
|
command: |
|
2018-12-01 21:08:08 +00:00
|
|
|
pipenv run pytest --cov=nucypher/crypto -v --runslow tests/crypto --junitxml=./reports/pytest/crypto_results.xml
|
2018-12-04 07:08:55 +00:00
|
|
|
- run: *coveralls
|
2018-06-30 07:05:46 +00:00
|
|
|
- store_test_results:
|
|
|
|
path: ./reports/pytest/
|
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:
|
|
|
|
- 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-11-28 05:24:17 +00:00
|
|
|
command: |
|
2018-12-01 21:08:08 +00:00
|
|
|
pipenv run pytest --cov=nucypher/network -v --runslow $(circleci tests glob tests/network/**/test_*.py | circleci tests split --split-by=timings) --junitxml=./reports/pytest/network_results.xml
|
2018-12-04 07:08:55 +00:00
|
|
|
- run: *coveralls
|
2018-06-30 07:05:46 +00:00
|
|
|
- store_test_results:
|
|
|
|
path: ./reports/pytest/
|
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:
|
|
|
|
- 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-11-28 05:24:17 +00:00
|
|
|
command: |
|
2018-12-01 21:08:08 +00:00
|
|
|
pipenv run pytest --cov=nucypher/keystore -v --runslow $(circleci tests glob tests/keystore/**/test_*.py | circleci tests split --split-by=timings) --junitxml=./reports/pytest/keystore_results.xml
|
2018-12-04 07:08:55 +00:00
|
|
|
- run: *coveralls
|
2018-06-30 07:05:46 +00:00
|
|
|
- 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-12-01 21:08:08 +00:00
|
|
|
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:
|
|
|
|
name: Character Tests
|
2018-11-28 05:24:17 +00:00
|
|
|
command: |
|
2018-12-01 21:08:08 +00:00
|
|
|
pipenv run pytest --cov=nucypher -v --runslow $(circleci tests glob tests/characters/**/test_*.py | circleci tests split --split-by=timings) --junitxml=./reports/pytest/character_results.xml
|
2018-12-04 07:08:55 +00:00
|
|
|
- run: *coveralls
|
2018-06-30 07:05:46 +00:00
|
|
|
- store_test_results:
|
|
|
|
path: ./reports/pytest/
|
2018-06-17 18:32:42 +00:00
|
|
|
|
2018-11-24 02:20:06 +00:00
|
|
|
learning:
|
|
|
|
<<: *python_36_base
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- attach_workspace:
|
|
|
|
at: ~/.local/share/virtualenvs/
|
|
|
|
- run:
|
|
|
|
name: Learner Tests
|
|
|
|
command: pipenv run pytest --cov=nucypher -v --runslow tests/learning --junitxml=./reports/pytest/results.xml
|
2018-11-24 05:13:11 +00:00
|
|
|
- run: *coveralls
|
2018-11-24 02:20:06 +00:00
|
|
|
- store_test_results:
|
|
|
|
path: ./reports/pytest/
|
|
|
|
|
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-12-01 21:08:08 +00:00
|
|
|
pipenv run pytest -v --runslow tests/blockchain/eth/contracts/main/test_intercontract_integration.py --junitxml=./reports/pytest/intercontract_integration_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-11-24 02:20:06 +00:00
|
|
|
cli:
|
2018-09-01 15:25:02 +00:00
|
|
|
<<: *python_36_base
|
2018-12-01 21:08:08 +00:00
|
|
|
parallelism: 4
|
2018-09-01 15:25:02 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- attach_workspace:
|
|
|
|
at: ~/.local/share/virtualenvs/
|
|
|
|
- run:
|
|
|
|
name: Nucypher CLI Tests
|
|
|
|
command: |
|
2018-12-01 21:08:08 +00:00
|
|
|
pipenv run pytest --cov=nucypher/cli.py -v --runslow $(circleci tests glob tests/cli/**/test_*.py | circleci tests split --split-by=timings) --junitxml=./reports/pytest/cli_results.xml
|
2018-12-04 07:08:55 +00:00
|
|
|
- run: *coveralls
|
2018-09-01 15:25:02 +00:00
|
|
|
- store_test_results:
|
|
|
|
path: ./reports/pytest/
|
|
|
|
|
2018-11-24 02:20:06 +00:00
|
|
|
ursula_command:
|
2018-11-24 02:04:02 +00:00
|
|
|
<<: *python_36_base
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- attach_workspace:
|
|
|
|
at: ~/.local/share/virtualenvs/
|
|
|
|
- run:
|
|
|
|
name: Ursula Command Tests
|
|
|
|
command: |
|
|
|
|
pipenv run pytest -v --cov=nucypher/cli.py --runslow tests/cli/protocol --junitxml=./reports/pytest/results.xml
|
|
|
|
- run: *coveralls
|
|
|
|
- store_test_results:
|
|
|
|
path: ./reports/pytest/
|
|
|
|
|
2018-11-24 02:20:06 +00:00
|
|
|
mypy:
|
2018-07-19 23:04:09 +00:00
|
|
|
<<: *python_36_base
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- attach_workspace:
|
|
|
|
at: ~/.local/share/virtualenvs/
|
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-11-24 02:20:06 +00:00
|
|
|
test_build:
|
|
|
|
<<: *python_36_base
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
name: Install Dependencies (Test Build)
|
|
|
|
command: |
|
|
|
|
pipenv install --three --dev --skip-lock --pre
|
|
|
|
pipenv install --dev --skip-lock twine
|
|
|
|
- run:
|
|
|
|
name: Build Python Wheel
|
|
|
|
command: |
|
|
|
|
pipenv run python setup.py sdist
|
|
|
|
pipenv run python setup.py bdist_wheel -v
|
|
|
|
- run:
|
2018-11-24 05:13:11 +00:00
|
|
|
name: Install Nucypher via Wheel
|
2018-11-24 02:20:06 +00:00
|
|
|
command: |
|
2018-11-24 03:42:52 +00:00
|
|
|
pip3 install --user ./dist/nucypher-0.1.0a0-py3-none-any.whl[test]
|
|
|
|
- run:
|
2018-11-24 05:13:11 +00:00
|
|
|
name: Run Entrypoint Version Commands
|
2018-11-24 03:42:52 +00:00
|
|
|
command: |
|
2018-11-24 05:13:11 +00:00
|
|
|
python -c "import nucypher; print(nucypher.__version__)"
|
|
|
|
nucypher --version
|
2018-11-24 02:20:06 +00:00
|
|
|
|
2018-11-04 17:11:51 +00:00
|
|
|
test_deploy:
|
|
|
|
<<: *python_36_base
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
name: Install Dependencies (Test Deploy)
|
|
|
|
command: |
|
|
|
|
pipenv install --three --dev --skip-lock --pre
|
|
|
|
pipenv install --dev --skip-lock twine
|
|
|
|
- run:
|
|
|
|
name: Verify git tag == __version__ (Test Deploy)
|
|
|
|
command: pipenv run python setup.py verify
|
|
|
|
- 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: |
|
|
|
|
pipenv run python setup.py sdist
|
|
|
|
pipenv run python setup.py bdist_wheel
|
|
|
|
- run:
|
|
|
|
name: upload to TestPyPI
|
|
|
|
command: pipenv run twine upload --repository testpypi dist/* --verbose
|
|
|
|
- run:
|
|
|
|
name: pip install from TestPyPI
|
|
|
|
command: |
|
|
|
|
pip install --user --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple nucypher --verbose
|
|
|
|
python -c "import nucypher; print(nucypher.__version__)"
|
|
|
|
|
|
|
|
deploy:
|
|
|
|
<<: *python_36_base
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
name: Install dependencies
|
|
|
|
command: |
|
|
|
|
pipenv install --three --dev --skip-lock --pre
|
|
|
|
pipenv install --dev --skip-lock twine
|
|
|
|
- run:
|
|
|
|
name: Verify git tag == __version__
|
|
|
|
command: pipenv run python setup.py verify
|
|
|
|
- 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: |
|
|
|
|
pipenv run python setup.py sdist
|
|
|
|
pipenv run python setup.py bdist_wheel
|
|
|
|
- run:
|
|
|
|
name: Upload to PyPI
|
|
|
|
command: pipenv run twine upload dist/* --verbose
|
|
|
|
- run:
|
|
|
|
name: pip install from PyPI
|
|
|
|
command: |
|
|
|
|
pip install --user nucypher --verbose
|
|
|
|
python -c "import nucypher; print(nucypher.__version__)"
|