diff --git a/.circleci/config.yml b/.circleci/config.yml index 63a842f747ebaca1398b9e018d03ea3efdd9f46b..f01b5d6eb60fdeab5b0dbacf19f5a6718d2d4d33 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,7 +8,7 @@ jobs: docker: # specify the version you desire here # use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers` - - image: circleci/python:3.6.2 + - image: circleci/python:3.6.4 # Specify service dependencies here if necessary # CircleCI maintains a library of pre-built images @@ -56,3 +56,74 @@ jobs: if [ "${CIRCLE_BRANCH}" == "master" ]; then tox -e upload_coverage fi + build-python2.7: + docker: + - image: circleci/python:2.7.13 + working_directory: ~/repo + steps: + - checkout + # Download and cache dependencies + - restore_cache: + keys: + - v1-dependencies-{{ checksum "requirements.txt" }} + # fallback to using the latest cache if no exact match is found + - v1-dependencies- + - run: + name: install dependencies + command: | + sudo python -m pip install --upgrade pip setuptools wheel mock pytest pytest-cov parameterized secp256k1 cryptography scrypt + sudo python -m pip install -r requirements.txt + sudo python -m pip install --upgrade pycodestyle pyflakes coverage tox codacy-coverage virtualenv + + - run: + name: run tests + command: | + tox -e py27 + + build-python3.4: + docker: + - image: circleci/python:3.4.8 + working_directory: ~/repo + steps: + - checkout + # Download and cache dependencies + - restore_cache: + keys: + - v1-dependencies-{{ checksum "requirements.txt" }} + # fallback to using the latest cache if no exact match is found + - v1-dependencies- + - run: + name: install dependencies + command: | + sudo python -m pip install --upgrade pip setuptools wheel mock pytest pytest-cov parameterized secp256k1 cryptography scrypt + sudo python -m pip install -r requirements.txt + sudo python -m pip install --upgrade pycodestyle pyflakes coverage tox codacy-coverage virtualenv + + - run: + name: run tests + command: | + tox -e py34 + + build-python3.5: + docker: + - image: circleci/python:3.5.5 + working_directory: ~/repo + steps: + - checkout + # Download and cache dependencies + - restore_cache: + keys: + - v1-dependencies-{{ checksum "requirements.txt" }} + # fallback to using the latest cache if no exact match is found + - v1-dependencies- + - run: + name: install dependencies + command: | + sudo python -m pip install --upgrade pip setuptools wheel mock pytest pytest-cov parameterized secp256k1 cryptography scrypt + sudo python -m pip install -r requirements.txt + sudo python -m pip install --upgrade pycodestyle pyflakes coverage tox codacy-coverage virtualenv + + - run: + name: run tests + command: | + tox -e py35 diff --git a/.travis.yml b/.travis.yml index dfecc8704bed70792c9fb0ec60f77e3a2b0aaaca..90d5d7b322a0b07ade5045ec4d5e2ba2c90e8c61 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,35 +24,25 @@ matrix: - os: linux python: 2.7 env: - - TOXENV=py27 + - TOXENV=short - os: linux python: 3.4 env: - - TOXENV=py34 + - TOXENV=short - os: linux python: 3.5 env: - - TOXENV=py35 + - TOXENV=short - os: linux python: 3.6 env: - - TOXENV=py36 - # - os: linux - # python: 3.7 - # env: - # - TOXENV=py37 - - os: osx - osx_image: xcode7.3 - language: objective-c - env: - - TRAVIS_PYTHON_VERSION=3.5 - - TOXENV=py35 + - TOXENV=py36short - os: osx osx_image: xcode9.2 language: objective-c env: - TRAVIS_PYTHON_VERSION=3.6 - - TOXENV=py36 + - TOXENV=py36short cache: pip diff --git a/tox.ini b/tox.ini index c3060927f4fa2eee5c6bca3624a0692eb70f3036..d72af8e9acc9f096135bfcbd485b92fffd8e1c93 100644 --- a/tox.ini +++ b/tox.ini @@ -14,6 +14,18 @@ deps = commands = pytest +[testenv:short] +deps = + mock>=2.0.0 + pytest + pytest-mock + parameterized + cryptography + secp256k1 + scrypt +commands = + pytest tests/beemapi tests/beembase tests/beemgraphene + [testenv:py36] deps = mock>=2.0.0 @@ -30,6 +42,22 @@ commands = coverage report -m coverage xml +[testenv:py36short] +deps = + mock>=2.0.0 + pytest + pytest-mock + parameterized + coverage + cryptography + secp256k1 + scrypt +commands = + coverage run --parallel-mode -m pytest tests/beemapi tests/beembase tests/beemgraphene {posargs} + coverage combine + coverage report -m + coverage xml + [testenv:flake8] deps= flake8