From ee4fc419185cfca5afeaf6f2765e2693ac658071 Mon Sep 17 00:00:00 2001 From: Holger Nahrstaedt <holger@nahrstaedt.de> Date: Wed, 11 Apr 2018 13:21:08 +0200 Subject: [PATCH] Update ci --- .circleci/config.yml | 73 +++++++++++++++++++++++++++++++++++++++++++- .travis.yml | 20 +++--------- tox.ini | 28 +++++++++++++++++ 3 files changed, 105 insertions(+), 16 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 63a842f7..f01b5d6e 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 dfecc870..90d5d7b3 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 c3060927..d72af8e9 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 -- GitLab