nucypher/.circleci/config.yml

157 lines
4.4 KiB
YAML
Raw Normal View History

version: 2.0
workflows:
version: 2
test:
jobs:
- bundle_dependencies-36
- contract_unit:
requires:
- bundle_dependencies-36
- intercontract_integration:
requires:
- contract_unit
- crypto_unit:
requires:
- bundle_dependencies-36
- network_unit:
requires:
- bundle_dependencies-36
- keystore_unit:
requires:
- bundle_dependencies-36
- blockchain_client_unit:
requires:
- bundle_dependencies-36
- character:
requires:
- crypto_unit
- network_unit
- keystore_unit
bundle_dependencies: &bundle_dependencies
steps:
- checkout
- restore_cache:
key: deps-{{ .Branch }}-{{ checksum "Pipfile" }}
- run:
name: Install Python dependencies with Pipenv
command: |
pipenv install --three --dev --skip-lock
- run:
name: Install Solidity compiler
command: |
wget "https://github.com/ethereum/solidity/releases/download/${SOLC_VER}/solc-static-linux" -O "$(pipenv --venv)/bin/solc"
chmod +x "$(pipenv --venv)/bin/solc"
environment:
SOLC_VER: "v0.4.24"
- save_cache:
paths:
- "~/.local/share/virtualenvs/"
key: deps-{{ .Branch }}-{{ checksum "Pipfile" }}
2018-06-16 22:33:28 +00:00
jobs:
bundle_dependencies-36:
<<: *bundle_dependencies
working_directory: ~/nucypher-depends
docker:
- image: circleci/python:3.6
contract_unit:
parallelism: 3
working_directory: ~/nucypher-depends
docker:
- image: circleci/python:3.6
steps:
- checkout
- restore_cache:
key: deps-{{ .Branch }}-{{ checksum "Pipfile" }}
- run:
name: Ethereum Contract Unit Tests
command: |
pipenv run pytest --junitxml=./reports/pytest/eth-contract-unit-report.xml -v --runslow $(circleci tests glob tests/blockchain/eth/contracts/unit/test_*.py | circleci tests split --split-by=timings)
- store_test_results:
path: ./reports/pytest/
intercontract_integration:
working_directory: ~/nucypher-depends
docker:
- image: circleci/python:3.6
steps:
- checkout
- restore_cache:
key: deps-{{ .Branch }}-{{ checksum "Pipfile" }}
- run:
name: Ethereum Inter-Contract Integration Test
command: |
pipenv run pytest -v --runslow tests/blockchain/eth/contracts/integration
- store_test_results:
path: ~/nucypher-depends/timing-results/
crypto_unit:
working_directory: ~/nucypher-depends
docker:
- image: circleci/python:3.6
steps:
- checkout
- restore_cache:
key: deps-{{ .Branch }}-{{ checksum "Pipfile" }}
- run:
name: Crypto Character Tests
command: |
pipenv run pytest --cov=nucypher/crypto -v --runslow tests/crypto
network_unit:
working_directory: ~/nucypher-depends
docker:
- image: circleci/python:3.6
steps:
- checkout
- restore_cache:
key: deps-{{ .Branch }}-{{ checksum "Pipfile" }}
- run:
name: Network Tests
command: |
pipenv run pytest --cov=nucypher/network -v --runslow tests/network
keystore_unit:
working_directory: ~/nucypher-depends
docker:
- image: circleci/python:3.6
steps:
- checkout
- restore_cache:
key: deps-{{ .Branch }}-{{ checksum "Pipfile" }}
- run:
name: Keystore Tests
command: |
pipenv run pytest --cov=nucypher/keystore -v --runslow tests/keystore
character:
working_directory: ~/nucypher-depends
docker:
- image: circleci/python:3.6
steps:
- checkout
- restore_cache:
key: deps-{{ .Branch }}-{{ checksum "Pipfile" }}
- run:
name: Character Tests
command: |
pipenv run pytest --cov=nucypher/characters -v --runslow tests/characters
blockchain_client_unit:
working_directory: ~/nucypher-depends
docker:
- image: circleci/python:3.6
steps:
- checkout
- restore_cache:
key: deps-{{ .Branch }}-{{ checksum "Pipfile" }}
- run:
name: Blockchain Client Tests
command: |
2018-06-26 07:34:27 +00:00
pipenv run pytest --cov=nucypher/blockchain/eth -v --runslow tests/blockchain/eth/client