diff --git a/.circleci/config.yml b/.circleci/config.yml index f350865..5f71106 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,49 +4,73 @@ # version: 2 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 - - 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! - # this example uses Django's built-in test-runner - # other common Python testing frameworks include pytest and nose - # https://pytest.org - # https://nose.readthedocs.io - - run: - name: run tests - command: | - . venv/bin/activate - tox - - - store_artifacts: - path: test-reports - destination: test-reports + + # using tox + toxify: + + docker: + - image: 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 + + myproj: + jobs: + - toxify + +#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