Skip to content

Commit

Permalink
enable circleci
Browse files Browse the repository at this point in the history
  • Loading branch information
yzhao062 committed Aug 4, 2019
1 parent 04988ba commit 038e675
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Python CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-python/ for more details
# Adapted from https://github.com/NeuralEnsemble/python-neo
version: 2
workflows:
test:
jobs:
- test-3.6
jobs:
test-3.6:
docker:
- image: circleci/python:3.6-stretch

working_directory: ~/repo

steps:
- checkout
- run: sudo chown -R circleci:circleci /usr/local/bin

# Download and cache dependencies
- restore_cache:
keys:
- v1-py3-dependencies-{{ checksum "requirements_ci.txt" }}
# fallback to using the latest cache if no exact match is found
- v1-py3-dependencies-

- run:
name: install dependencies
command: |
python3 -m venv venv
. venv/bin/activate
pip install --upgrade pip
pip install -r requirements_ci.txt
pip install pytest
pip install pytest-cov
- save_cache:
paths:
- ./venv
key: v1-py3-dependencies-{{ checksum "requirements.txt" }}


# run tests!
- run:
name: run tests
command: |
. venv/bin/activate
pytest
- store_artifacts:
path: test-reports
destination: test-reports

0 comments on commit 038e675

Please sign in to comment.