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-10-10 02:41:28 +00:00
|
|
|
- eth_contract_unit:
|
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-10-10 02:41:28 +00:00
|
|
|
- config_unit:
|
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-01 19:46:26 +00:00
|
|
|
- pip_install
|
|
|
|
- pipenv_install
|
2018-06-17 18:32:42 +00:00
|
|
|
- crypto_unit:
|
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-06-17 18:32:42 +00:00
|
|
|
- network_unit:
|
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-06-17 18:32:42 +00:00
|
|
|
- keystore_unit:
|
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-06-27 22:28:40 +00:00
|
|
|
- blockchain_interface_unit:
|
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-01 21:44:26 +00:00
|
|
|
- blockchain_entities:
|
|
|
|
context: "NuCypher Tests"
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
|
|
|
requires:
|
|
|
|
- pip_install
|
|
|
|
- pipenv_install
|
2018-06-17 18:32:42 +00:00
|
|
|
- character:
|
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-06-27 22:28:40 +00:00
|
|
|
- intercontract_integration:
|
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:
|
|
|
|
- eth_contract_unit
|
2018-10-10 02:41:28 +00:00
|
|
|
- mypy_type_check:
|
2018-11-04 17:11:51 +00:00
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2018-10-10 02:41:28 +00:00
|
|
|
requires:
|
|
|
|
- config_unit
|
|
|
|
- crypto_unit
|
|
|
|
- network_unit
|
|
|
|
- keystore_unit
|
|
|
|
- character
|
|
|
|
- cli_tests:
|
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-01 21:44:26 +00:00
|
|
|
- blockchain_entities
|
2018-10-10 02:41:28 +00:00
|
|
|
- blockchain_interface_unit
|
|
|
|
- config_unit
|
|
|
|
- crypto_unit
|
|
|
|
- network_unit
|
|
|
|
- keystore_unit
|
|
|
|
- character
|
2018-11-04 17:11:51 +00:00
|
|
|
- test_deploy:
|
|
|
|
context: "NuCypher PyPI"
|
|
|
|
requires:
|
|
|
|
- mypy_type_check
|
|
|
|
- cli_tests
|
|
|
|
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-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:
|
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: |
|
|
|
|
pip3 install --user -e .[testing]
|
|
|
|
- run:
|
|
|
|
name: Install Solidity Compiler
|
|
|
|
command: ./scripts/install_solc.sh
|
|
|
|
- run:
|
|
|
|
name: Check Python Entrypoint
|
|
|
|
command: python3 -c "import nucypher; print(nucypher.__version__)"
|
|
|
|
|
2018-06-27 22:28:40 +00:00
|
|
|
blockchain_interface_unit:
|
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
|
|
|
|
command: |
|
|
|
|
pipenv run pytest --cov=nucypher/blockchain/eth -v --runslow $(circleci tests glob tests/blockchain/eth/interfaces/**/test_*.py | circleci tests split --split-by=timings) --junitxml=./reports/pytest/blockchain_interface_results.xml
|
|
|
|
- run:
|
|
|
|
name: Upload Coverage Report
|
|
|
|
command: |
|
|
|
|
echo -e "COVERALLS_REPO_TOKEN=$COVERALLS_REPO_TOKEN" >> .env
|
|
|
|
pipenv run coveralls
|
|
|
|
- store_test_results:
|
|
|
|
path: ./reports/pytest/
|
|
|
|
|
|
|
|
blockchain_entities:
|
2018-06-27 22:28:40 +00:00
|
|
|
<<: *python_36_base
|
2018-12-01 21:08:08 +00:00
|
|
|
parallelism: 6
|
2018-06-27 22:28:40 +00:00
|
|
|
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-11-28 05:24:17 +00:00
|
|
|
command: |
|
2018-12-01 21:44:26 +00:00
|
|
|
pipenv run pytest --cov=nucypher/blockchain/eth -v --runslow $(circleci tests glob tests/blockchain/eth/entities/**/test_*.py | circleci tests split --split-by=timings) --junitxml=./reports/pytest/blockchain_interface_results.xml
|
2018-12-01 20:53:00 +00:00
|
|
|
- run:
|
|
|
|
name: Upload Coverage Report
|
|
|
|
command: |
|
|
|
|
echo -e "COVERALLS_REPO_TOKEN=$COVERALLS_REPO_TOKEN" >> .env
|
2018-11-28 05:24:17 +00:00
|
|
|
pipenv 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-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)
|
2018-12-01 20:53:00 +00:00
|
|
|
- run:
|
|
|
|
name: Upload Coverage Report
|
|
|
|
command: |
|
|
|
|
echo -e "COVERALLS_REPO_TOKEN=$COVERALLS_REPO_TOKEN" >> .env
|
2018-11-28 05:24:17 +00:00
|
|
|
pipenv run coveralls
|
2018-10-10 02:41:28 +00:00
|
|
|
- store_test_results:
|
|
|
|
path: ./reports/pytest/
|
|
|
|
|
|
|
|
config_unit:
|
|
|
|
<<: *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-01 20:53:00 +00:00
|
|
|
- run:
|
|
|
|
name: Upload Coverage Report
|
|
|
|
command: |
|
|
|
|
echo -e "COVERALLS_REPO_TOKEN=$COVERALLS_REPO_TOKEN" >> .env
|
2018-11-28 05:24:17 +00:00
|
|
|
pipenv run coveralls
|
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-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-01 20:53:00 +00:00
|
|
|
- run:
|
|
|
|
name: Upload Coverage Report
|
|
|
|
command: |
|
|
|
|
echo -e "COVERALLS_REPO_TOKEN=$COVERALLS_REPO_TOKEN" >> .env
|
2018-11-28 05:24:17 +00:00
|
|
|
pipenv 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-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-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-01 20:53:00 +00:00
|
|
|
- run:
|
|
|
|
name: Upload Coverage Report
|
|
|
|
command: |
|
|
|
|
echo -e "COVERALLS_REPO_TOKEN=$COVERALLS_REPO_TOKEN" >> .env
|
2018-11-28 05:24:17 +00:00
|
|
|
pipenv 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-06-17 18:32:42 +00:00
|
|
|
keystore_unit:
|
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-01 20:14:52 +00:00
|
|
|
- run:
|
|
|
|
name: Upload Coverage Report
|
|
|
|
command: |
|
|
|
|
echo -e "COVERALLS_REPO_TOKEN=$COVERALLS_REPO_TOKEN" >> .env
|
2018-11-28 05:24:17 +00:00
|
|
|
pipenv 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-01 20:53:00 +00:00
|
|
|
- run:
|
|
|
|
name: Upload Coverage Report
|
|
|
|
command: |
|
|
|
|
echo -e "COVERALLS_REPO_TOKEN=$COVERALLS_REPO_TOKEN" >> .env
|
2018-11-28 05:24:17 +00:00
|
|
|
pipenv 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-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-10-10 02:41:28 +00:00
|
|
|
cli_tests:
|
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-01 20:53:00 +00:00
|
|
|
- run:
|
|
|
|
name: Upload Coverage Report
|
|
|
|
command: |
|
|
|
|
echo -e "COVERALLS_REPO_TOKEN=$COVERALLS_REPO_TOKEN" >> .env
|
|
|
|
pipenv run coveralls
|
2018-09-01 15:25:02 +00:00
|
|
|
- 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-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
|
|
|
|
|
|
|
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__)"
|