mirror of https://github.com/nucypher/nucypher.git
Add mypy build to circleci; Use workflow ID number as dep cache key
parent
4bccd6589b
commit
ba631e6806
|
@ -5,6 +5,9 @@ workflows:
|
|||
test:
|
||||
jobs:
|
||||
- bundle_dependencies-36
|
||||
- mypy_type_check:
|
||||
requires:
|
||||
- bundle_dependencies-36
|
||||
- eth_contract_unit:
|
||||
requires:
|
||||
- bundle_dependencies-36
|
||||
|
@ -31,8 +34,6 @@ workflows:
|
|||
|
||||
python_36_base: &python_36_base
|
||||
working_directory: ~/nucypher-depends
|
||||
environment:
|
||||
PIPENV_VENV_IN_PROJECT: "True"
|
||||
docker:
|
||||
- image: circleci/python:3.6
|
||||
|
||||
|
@ -44,22 +45,21 @@ jobs:
|
|||
- run:
|
||||
name: Install Python Dependencies with Pipenv
|
||||
command: |
|
||||
export PIPENV_VENV_IN_PROJECT=True
|
||||
pipenv install --three --dev --pre --skip-lock
|
||||
- run:
|
||||
name: Install Solidity Compiler
|
||||
command: pipenv run install_solc
|
||||
- save_cache:
|
||||
paths:
|
||||
- "./.venv"
|
||||
key: v2-deps-{{ .Branch }}-{{ checksum "Pipfile" }}
|
||||
- "~/.local/share/virtualenvs/"
|
||||
key: v1-deps-{{ .Environment.CIRCLE_WORKFLOW_ID }}-{{ checksum "Pipfile" }}
|
||||
|
||||
blockchain_interface_unit:
|
||||
<<: *python_36_base
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: v2-deps-{{ .Branch }}-{{ checksum "Pipfile" }}
|
||||
key: v1-deps-{{ .Environment.CIRCLE_WORKFLOW_ID }}-{{ checksum "Pipfile" }}
|
||||
- run:
|
||||
name: Blockchain Interface Tests
|
||||
command: pipenv run pytest --cov=nucypher/blockchain/eth -v --runslow tests/blockchain/eth/interfaces tests/blockchain/eth/entities
|
||||
|
@ -70,7 +70,7 @@ jobs:
|
|||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: v2-deps-{{ .Branch }}-{{ checksum "Pipfile" }}
|
||||
key: v1-deps-{{ .Environment.CIRCLE_WORKFLOW_ID }}-{{ checksum "Pipfile" }}
|
||||
- run:
|
||||
name: Ethereum Contract Unit Tests
|
||||
command: |
|
||||
|
@ -83,7 +83,7 @@ jobs:
|
|||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: v2-deps-{{ .Branch }}-{{ checksum "Pipfile" }}
|
||||
key: v1-deps-{{ .Environment.CIRCLE_WORKFLOW_ID }}-{{ checksum "Pipfile" }}
|
||||
- run:
|
||||
name: Crypto Character Tests
|
||||
command: pipenv run pytest --cov=nucypher/crypto -v --runslow tests/crypto
|
||||
|
@ -93,7 +93,7 @@ jobs:
|
|||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: v2-deps-{{ .Branch }}-{{ checksum "Pipfile" }}
|
||||
key: v1-deps-{{ .Environment.CIRCLE_WORKFLOW_ID }}-{{ checksum "Pipfile" }}
|
||||
- run:
|
||||
name: Network Tests
|
||||
command: pipenv run pytest --cov=nucypher/network -v --runslow tests/network
|
||||
|
@ -103,7 +103,7 @@ jobs:
|
|||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: v2-deps-{{ .Branch }}-{{ checksum "Pipfile" }}
|
||||
key: v1-deps-{{ .Environment.CIRCLE_WORKFLOW_ID }}-{{ checksum "Pipfile" }}
|
||||
- run:
|
||||
name: Keystore Tests
|
||||
command: pipenv run pytest --cov=nucypher/keystore -v --runslow tests/keystore
|
||||
|
@ -113,7 +113,7 @@ jobs:
|
|||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: v2-deps-{{ .Branch }}-{{ checksum "Pipfile" }}
|
||||
key: v1-deps-{{ .Environment.CIRCLE_WORKFLOW_ID }}-{{ checksum "Pipfile" }}
|
||||
- run:
|
||||
name: Character Tests
|
||||
command: pipenv run pytest --cov=nucypher/characters -v --runslow tests/characters
|
||||
|
@ -123,8 +123,20 @@ jobs:
|
|||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: v2-deps-{{ .Branch }}-{{ checksum "Pipfile" }}
|
||||
key: v1-deps-{{ .Environment.CIRCLE_WORKFLOW_ID }}-{{ checksum "Pipfile" }}
|
||||
- run:
|
||||
name: Ethereum Inter-Contract Integration Test
|
||||
command: |
|
||||
pipenv run pytest -v --runslow tests/blockchain/eth/contracts/integration
|
||||
|
||||
mypy_type_check:
|
||||
<<: *python_36_base
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: v1-deps-{{ .Environment.CIRCLE_WORKFLOW_ID }}-{{ checksum "Pipfile" }}
|
||||
- run:
|
||||
name: Run Mypy Static Type Checks
|
||||
command: pipenv run mypy --xslt-html-report ./mypy_report ./nucypher
|
||||
- store_artifacts:
|
||||
path: ./mypy_report
|
||||
|
|
Loading…
Reference in New Issue