diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..4464db20 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,80 @@ +# CircleCI 2.0 configuration file for this project. +# +# Notes: +# - Do not use CircleCI's brand of Docker images unless it is for a secondary environment. +# - We chose not to use dependencies caching because it is complicated to do it right and it is +# not worth the effort for a project so small. +# +# For more information check out: +# - https://circleci.com/docs/2.0/language-python/ for more details +# - https://circleci.com/docs/2.0/configuration-reference/ +# +version: 2 +jobs: + test-py37: + docker: + - image: python:3.7.2 + + working_directory: ~/repo + + steps: + - checkout + + - run: + name: install dependencies + command: | + python3 -m venv venv + . venv/bin/activate + pip install --upgrade pip + pip install --upgrade setuptools wheel + pip install -r requirements/test.txt + pip install -r requirements/extras.txt + + - run: + name: run tests + command: | + . venv/bin/activate + make lint + tox -e py37 + codecov + make test-coverage-report-console + make test-coverage-report-html + + - store_artifacts: + path: test-reports + destination: test-reports + + dist: + docker: + - image: python:3.7.2 + + working_directory: ~/repo + + steps: + - checkout + + - run: + name: install dependencies + command: | + python3 -m venv venv + . venv/bin/activate + pip install --upgrade pip + pip install --upgrade setuptools wheel + pip install -r requirements/release.txt + + - run: + name: make dist + command: | + . venv/bin/activate + make dist + + - store_artifacts: + path: dist + destination: dist + +workflows: + version: 2 + ci: + jobs: + - test-py37 + - dist