mirror of https://github.com/nucypher/nucypher.git
Subdivide contract tests; Add parallel step circleci contract workflow
parent
d6ca9af451
commit
06f7b31fcd
|
|
@ -1,24 +1,78 @@
|
|||
version: 2
|
||||
version: 2.0
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
test:
|
||||
jobs:
|
||||
- build_dependencies-35
|
||||
- build_dependencies-36
|
||||
- contract_unit_tests-36:
|
||||
requires:
|
||||
- build_dependencies-36
|
||||
- intercontract_integration_tests:
|
||||
requires:
|
||||
- contract_unit_tests-36
|
||||
|
||||
build_dependencies: &build_dependencies
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: Install Pipenv itself
|
||||
command: pip install pipenv --upgrade
|
||||
- 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" }}-{{ .Environment.PY_DEP_VERSION }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
working_directory: ~/nucypher-build
|
||||
docker:
|
||||
- image: circleci/python:3.6
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: deps1-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
|
||||
- run:
|
||||
name: Pipenv installation
|
||||
command: |
|
||||
pip install pipenv --upgrade
|
||||
pipenv install --dev --three
|
||||
- run:
|
||||
name: Solc installation
|
||||
command: |
|
||||
wget https://github.com/solidity/releases/download/v0.4.24/solc-static-linux -O "$(pipenv --venv)/bin/solc"
|
||||
chmod +x "$(pipenv --venv)/bin/solc"
|
||||
- save_cache:
|
||||
key: deps1-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
|
||||
paths:
|
||||
- "$(pipenv --venv)"
|
||||
build_dependencies-35:
|
||||
<<: *build_dependencies
|
||||
working_directory: ~/nucypher-depends-35
|
||||
docker:
|
||||
- image: circleci/python:3.5
|
||||
|
||||
build_dependencies-36:
|
||||
<<: *build_dependencies
|
||||
working_directory: ~/nucypher-depends-36
|
||||
docker:
|
||||
- image: circleci/python:3.6
|
||||
|
||||
contract_unit_tests-36:
|
||||
working_directory: ~/nucypher-depends-36
|
||||
docker:
|
||||
- image: circleci/python:3.6
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: deps-{{ .Branch }}-{{ checksum "Pipfile" }}-{{ .Environment.PY_DEP_VERSION }}
|
||||
- run:
|
||||
name: Ethereum Contract Unit Test
|
||||
command: |
|
||||
pipenv run pytest --cov=nucypher -v --runslow nucypher/tests/blockchain/eth/contracts/unit
|
||||
|
||||
intercontract_integration_tests-36:
|
||||
working_directory: ~/nucypher-depends-36
|
||||
docker:
|
||||
- image: circleci/python:3.6
|
||||
environment:
|
||||
PY_DEP_VERSION: "py3.6"
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: deps-{{ .Branch }}-{{ checksum "Pipfile" }}-{{ .Environment.PY_DEP_VERSION }}
|
||||
- run:
|
||||
name: Ethereum Inter-Contract Integration Test
|
||||
command: |
|
||||
pipenv run pytest --cov=nucypher -v --runslow nucypher/tests/blockchain/eth/contracts/integration
|
||||
|
||||
|
|
|
|||
18
.travis.yml
18
.travis.yml
|
|
@ -1,18 +0,0 @@
|
|||
language: python
|
||||
cache: pip
|
||||
python:
|
||||
- '3.5'
|
||||
- '3.6'
|
||||
- '3.7-dev'
|
||||
install:
|
||||
- pip install pipenv --upgrade
|
||||
- pipenv install --dev --three --skip-lock
|
||||
before_script:
|
||||
- wget https://github.com/ethereum/solidity/releases/download/v0.4.24/solc-static-linux -O "${VIRTUAL_ENV}/bin/solc"
|
||||
- chmod +x "${VIRTUAL_ENV}/bin/solc"
|
||||
script:
|
||||
- pipenv run -- pytest --runslow --cov=nucypher -v tests
|
||||
- codecov
|
||||
matrix:
|
||||
allow_failures:
|
||||
- python: '3.7-dev'
|
||||
9
Pipfile
9
Pipfile
|
|
@ -3,6 +3,7 @@ url = "https://pypi.python.org/simple"
|
|||
verify_ssl = true
|
||||
name = "pypi"
|
||||
|
||||
|
||||
[packages]
|
||||
# Wheels for cryptography until the next release.
|
||||
cryptography35_linux = { file='./wheelhouse/cryptography-2.3.dev1-cp35-cp35m-linux_x86_64.whl', markers="python_version >= '3.5' and python_version < '3.6' and platform_system == 'Linux'"}
|
||||
|
|
@ -18,25 +19,25 @@ bidict = "*"
|
|||
py_ecc = "*"
|
||||
SQLAlchemy = "*"
|
||||
apistar = "*"
|
||||
mypy = "*"
|
||||
maya = "*"
|
||||
pyumbral = {git = "https://github.com/nucypher/pyumbral.git", ref = "nucypher-depend"}
|
||||
requests = "*"
|
||||
hendrix = {git = "https://github.com/hendrix/hendrix", ref = "tags/3.0.0rc1"}
|
||||
hendrix = "==3.0.0"
|
||||
constantSorrow = {git = "https://github.com/nucypher/constantSorrow.git", ref = "nucypher-depend"}
|
||||
bytestringSplitter = {git = "https://github.com/nucypher/byteStringSplitter.git", ref = "nucypher-depend"}
|
||||
appdirs = "*"
|
||||
web3 = "==4.3.0"
|
||||
|
||||
[dev-packages]
|
||||
pytest-mypy = "*"
|
||||
pytest = "*"
|
||||
mypy = "*"
|
||||
pytest-mypy = "*"
|
||||
codecov = "*"
|
||||
coverage = "*"
|
||||
pytest-cov = "*"
|
||||
py-solc = "*"
|
||||
py-evm = "==0.2.0a18"
|
||||
eth-tester = "==0.1.0b26"
|
||||
web3 = "==4.3.0"
|
||||
py-geth = "*"
|
||||
|
||||
[pipenv]
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1 @@
|
|||
[](https://circleci.com/gh/nucypher/nucypher/tree/master)
|
||||
Loading…
Reference in New Issue