Skip to content

Instantly share code, notes, and snippets.

@wajeeha-khalid
Last active August 9, 2018 10:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wajeeha-khalid/8744bc89095ee659f12a33ba3a2e42ef to your computer and use it in GitHub Desktop.
Save wajeeha-khalid/8744bc89095ee659f12a33ba3a2e42ef to your computer and use it in GitHub Desktop.
version: 2
jobs: # a collection of steps
build: # runs not using Workflows must have a `build` job as entry point
# working_directory: ~/circleci-apros # directory where steps will run
docker: # run the steps with Docker
- image: circleci/python:2.7
steps: # a collection of executable commands
- checkout # special step to check out source code to the working directory
- restore_cache: # restores saved dependency cache if the Branch key template or requirements.txt files have not changed since the previous run
key: dependency-cache-{{ .Branch }}-{{ checksum "requirements.txt" }}
- run: # install and activate virtual environment with pip
command: |
python2 -m virtualenv venv
. venv/bin/activate
pip install -r requirements.txt
- save_cache: # special step to save dependency cache
key: dependency-cache-{{ .Branch }}-{{ checksum "requirements.txt" }}
paths:
- venv
- run: # run tests
command: |
. venv/bin/activate
pip install -r test-requirements.txt
python manage.py test --settings=apros.test_settings
#version: 1
#machine:
# python:
# version: 2.7.12
#
#
#general:
# artifacts:
# - "reports"
#
#dependencies:
# override:
# - pip install -r requirements.txt
#
#test:
# override:
# - pip install -r test-requirements.txt
# - python manage.py test --settings=apros.test_settings
# - coverage run --source='.' manage.py test --settings=test_settings
# - coverage report
# - coverage html
# - coverage xml
#
# post:
# - mkdir -p $CIRCLE_ARTIFACTS/codecoverage
# - cp -r reports/cover_html $CIRCLE_ARTIFACTS/codecoverage/coverage_html/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment