diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..08539c8 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,44 @@ +version: 2.1 + +orbs: + python: circleci/python@0.3.0 + +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 \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a76b36a --- /dev/null +++ b/Makefile @@ -0,0 +1,8 @@ +test: + @pytest + +coverage: + @pytest --cov --cov-fail-under=70 --cov-config .coveragerc + +analyze: + @prospector --profile .prospector.yaml \ No newline at end of file