Skip to content

Instantly share code, notes, and snippets.

@vmesel
Created February 4, 2019 03:03
Show Gist options
  • Save vmesel/8b0316088321806b91d79f44e5d2c48c to your computer and use it in GitHub Desktop.
Save vmesel/8b0316088321806b91d79f44e5d2c48c to your computer and use it in GitHub Desktop.
version: 2 # use CircleCI 2.0
jobs: # A basic unit of work in a run
build: # runs not using Workflows must have a `build` job as entry point
# directory where steps are run
working_directory: ~/pyjobs
docker: # run the steps with Docker
# CircleCI Python images available at: https://hub.docker.com/r/circleci/python/
- image: circleci/python:3.6.4
environment: # environment variables for primary container
SECRET_KEY: THIS_IS_NOT_A_SECRET
PIPENV_VENV_IN_PROJECT: True
# CircleCI PostgreSQL images available at: https://hub.docker.com/r/circleci/postgres/
steps: # steps that comprise the `build` job
- checkout # check out source code to working directory
- restore_cache:
# Read about caching dependencies: https://circleci.com/docs/2.0/caching/
key: deps9-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
- run:
command: |
sudo pip install pipenv
pipenv install
- run:
command: |
pipenv run "python manage.py test"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment