Skip to content

Commit

Permalink
updated the CircleCI config file to try a different approach for tox
Browse files Browse the repository at this point in the history
  • Loading branch information
monocongo committed Jan 29, 2020
1 parent 649ead3 commit f247ee0
Showing 1 changed file with 70 additions and 46 deletions.
116 changes: 70 additions & 46 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit f247ee0

Please sign in to comment.