Skip to content

Commit

Permalink
add ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Kennel committed Jul 2, 2020
1 parent f1d2895 commit 13a71b7
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
version: 2.1

orbs:
python: circleci/[email protected]

jobs:
test-and-code-analysis:
docker:
- image: circleci/python:3.8.3
steps:
- checkout
- run: sudo chown -R circleci:circleci /usr/local/bin
- run: sudo chown -R circleci:circleci /usr/local/lib/python3.8/site-packages
- restore_cache:
key: deps9-{{ .Branch }}-{{ checksum "itsybitsy/setup.py" }}
- run:
command: |
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
- save_cache:
key: deps9-{{ .Branch }}-{{ checksum "itsybitsy/setup.py" }}
paths:
- ".venv"
- "/usr/local/bin"
- "/usr/local/lib/python3.8/site-packages"
- run:
command: |
source .venv/bin/activate
make test
- run:
command: |
source .venv/bin/activate
make coverage
- run:
command: |
source .venv/bin/activate
make analyze
workflows:
main:
jobs:
- test-and-code-analysis
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
test:
@pytest

coverage:
@pytest --cov --cov-fail-under=70 --cov-config .coveragerc

analyze:
@prospector --profile .prospector.yaml

0 comments on commit 13a71b7

Please sign in to comment.