Last active
August 9, 2018 10:13
-
-
Save wajeeha-khalid/8744bc89095ee659f12a33ba3a2e42ef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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