From b0170f112441b8b7852ef24b5da69936844d7c43 Mon Sep 17 00:00:00 2001 From: Kieran Prasch Date: Fri, 23 Nov 2018 18:04:02 -0800 Subject: [PATCH] Add ursula command test job, remove 'unit' language from CI config --- .circleci/config.yml | 66 ++++++++++++------- tests/cli/{ => commands}/test_main.py | 0 tests/cli/{ => commands}/test_run_ursula.py | 0 tests/cli/{ => commands}/test_stake.py | 0 tests/cli/{ => commands}/test_ursula.py | 0 .../test_ursula_command.py} | 0 6 files changed, 43 insertions(+), 23 deletions(-) rename tests/cli/{ => commands}/test_main.py (100%) rename tests/cli/{ => commands}/test_run_ursula.py (100%) rename tests/cli/{ => commands}/test_stake.py (100%) rename tests/cli/{ => commands}/test_ursula.py (100%) rename tests/cli/{test_protocol.py => protocol/test_ursula_command.py} (100%) diff --git a/.circleci/config.yml b/.circleci/config.yml index d259427e2..e1b021316 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,7 +12,7 @@ workflows: filters: tags: only: /.*/ - - eth_contract_unit: + - eth_contract: context: "NuCypher Tests" filters: tags: @@ -20,7 +20,7 @@ workflows: requires: - pip_install - pipenv_install - - config_unit: + - config: context: "NuCypher Tests" filters: tags: @@ -28,7 +28,7 @@ workflows: requires: - pip_install - pipenv_install - - crypto_unit: + - crypto: context: "NuCypher Tests" filters: tags: @@ -36,7 +36,7 @@ workflows: requires: - pip_install - pipenv_install - - network_unit: + - network: context: "NuCypher Tests" filters: tags: @@ -44,7 +44,7 @@ workflows: requires: - pip_install - pipenv_install - - keystore_unit: + - keystore: context: "NuCypher Tests" filters: tags: @@ -52,7 +52,7 @@ workflows: requires: - pip_install - pipenv_install - - blockchain_interface_unit: + - blockchain_interface: context: "NuCypher Tests" filters: tags: @@ -82,16 +82,16 @@ workflows: tags: only: /.*/ requires: - - eth_contract_unit + - eth_contract - mypy_type_check: filters: tags: only: /.*/ requires: - - config_unit - - crypto_unit - - network_unit - - keystore_unit + - config + - crypto + - network + - keystore - character - cli_tests: context: "NuCypher Tests" @@ -99,13 +99,19 @@ workflows: tags: only: /.*/ requires: - - blockchain_entities - - blockchain_interface_unit - - config_unit - - crypto_unit - - network_unit - - keystore_unit + - blockchain_interface + - config + - crypto + - network + - keystore - character + - ursula_command_tests: + context: "NuCypher Tests" + filters: + tags: + only: /.*/ + requires: + - cli_tests - test_deploy: context: "NuCypher PyPI" requires: @@ -187,7 +193,7 @@ jobs: name: Check Python Entrypoint command: python3 -c "import nucypher; print(nucypher.__version__)" - blockchain_interface_unit: + blockchain_interface: <<: *python_36_base parallelism: 2 steps: @@ -217,7 +223,7 @@ jobs: - store_test_results: path: ./reports/pytest/ - eth_contract_unit: + eth_contract: <<: *python_36_base parallelism: 4 steps: @@ -232,7 +238,7 @@ jobs: - store_test_results: path: ./reports/pytest/ - config_unit: + config: <<: *python_36_base parallelism: 2 steps: @@ -247,7 +253,7 @@ jobs: - store_test_results: path: ./reports/pytest/ - crypto_unit: + crypto: <<: *python_36_base steps: - checkout @@ -261,7 +267,7 @@ jobs: - store_test_results: path: ./reports/pytest/ - network_unit: + network: <<: *python_36_base steps: - checkout @@ -275,7 +281,7 @@ jobs: - store_test_results: path: ./reports/pytest/ - keystore_unit: + keystore: <<: *python_36_base parallelism: 2 steps: @@ -333,6 +339,20 @@ jobs: - store_test_results: path: ./reports/pytest/ + ursula_command_tests: + <<: *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/ + mypy_type_check: <<: *python_36_base steps: diff --git a/tests/cli/test_main.py b/tests/cli/commands/test_main.py similarity index 100% rename from tests/cli/test_main.py rename to tests/cli/commands/test_main.py diff --git a/tests/cli/test_run_ursula.py b/tests/cli/commands/test_run_ursula.py similarity index 100% rename from tests/cli/test_run_ursula.py rename to tests/cli/commands/test_run_ursula.py diff --git a/tests/cli/test_stake.py b/tests/cli/commands/test_stake.py similarity index 100% rename from tests/cli/test_stake.py rename to tests/cli/commands/test_stake.py diff --git a/tests/cli/test_ursula.py b/tests/cli/commands/test_ursula.py similarity index 100% rename from tests/cli/test_ursula.py rename to tests/cli/commands/test_ursula.py diff --git a/tests/cli/test_protocol.py b/tests/cli/protocol/test_ursula_command.py similarity index 100% rename from tests/cli/test_protocol.py rename to tests/cli/protocol/test_ursula_command.py