diff --git a/.circleci/config.yml b/.circleci/config.yml index b518487..7069028 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,73 +2,76 @@ # # Check https://circleci.com/docs/2.0/language-python/ for more details # -version: 2 -jobs: - # using tox - toxify: +# ------ WORKFLOW VERSION ------ +#version: 2 +#jobs: +# +# # using tox +# toxify: +# +# docker: +# - image: circleci/python:3.7 +# +# 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: pip install tox && tox +# +#workflows: +# version: 2 +# +# cvdata: +# jobs: +# - toxify +# ------ NON-WORKFLOW VERSION ------ +jobs: + build: docker: + # specify the version you desire here + # CircleCI maintains a library of pre-built images + # documented at https://circleci.com/docs/2.0/circleci-images/ - image: circleci/python:3.7 + working_directory: ~/repo + steps: - checkout - # download and cache dependencies + + # 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: pip install tox && tox + - run: + name: install dependencies + command: | + python3 -m venv venv + . venv/bin/activate + # pip install -e . + pip install tox -workflows: - version: 2 + - save_cache: + paths: + - ./venv + key: v1-dependencies-{{ checksum "requirements.txt" }} - cvdata: - jobs: - - toxify + # run tests with tox + - run: + name: run tests + command: | + . venv/bin/activate + tox -#jobs: -# build: -# docker: -# # specify the version you desire here -# # CircleCI maintains a library of pre-built images -# # documented at https://circleci.com/docs/2.0/circleci-images/ -# - image: circleci/python:3.7 -# -# 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: | -# python3 -m venv venv -# . venv/bin/activate -# pip install -e . -# pip install tox -# -# - save_cache: -# paths: -# - ./venv -# key: v1-dependencies-{{ checksum "requirements.txt" }} -# -# # run tests with tox -# - run: -# name: run tests -# command: | -# . venv/bin/activate -# tox -# -# - store_artifacts: -# path: test-reports -# destination: test-reports + - store_artifacts: + path: test-reports + destination: test-reports diff --git a/tox.ini b/tox.ini index 287bfae..2c52966 100644 --- a/tox.ini +++ b/tox.ini @@ -13,13 +13,14 @@ minversion = 3.3.0 isolated_build = true [testenv] +passenv = CI CIRCLECI CIRCLECI_* deps = - coverage + codecov opencv-python pytest scikit-image commands = python setup.py check -m -s py.test tests {posargs} - coverage + codecov