Skip to content

Instantly share code, notes, and snippets.

@toransahu
Last active November 11, 2022 09:25
Show Gist options
  • Save toransahu/c9769fb1e645fbf17635e1b49f4c5d95 to your computer and use it in GitHub Desktop.
Save toransahu/c9769fb1e645fbf17635e1b49f4c5d95 to your computer and use it in GitHub Desktop.
CircleCI config file: Setup for Pipenv; Created for ethereal-machines-backend in BitBucket
# Python CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-python/ for more details
#
version: 2
jobs:
build:
docker:
# specify the version you desire here
# use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers`
- image: circleci/python:3.6.4
environment:
PIPENV_VENV_IN_PROJECT: true
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/postgres:9.4
working_directory: ~/ethereal-machines-backend
steps:
- checkout
# Download and cache dependencies
# - restore_cache:
# key: deps9-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
- run:
name: install dependencies
command: |
sudo pip install pipenv
pipenv install
- save_cache:
key: deps9-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
paths:
- ".venv"
- "/usr/local/bin"
- "/usr/local/lib/python3.6/site-packages"
# 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: |
mkdir test-results
mkdir test-reports
cd src/
pipenv run "python manage.py test"
- store_test_results:
path: test-results
- store_artifacts:
path: test-reports
destination: test-reports
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment