.circleci/config.yml
version: 2
general:
branches:
ignore:
- gh-pages
jobs:
test:
docker:
- image: python:3.6
working_directory: ~/serum
steps:
- checkout
- run:
name: Prepare
command: |
pip install pipenv
pipenv sync -d
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
- run:
name: Lint
command: pipenv run lint
- run:
name: Test
command: |
./cc-test-reporter before-build
pipenv run test
./cc-test-reporter after-build --coverage-input-type coverage.py --exit-code $?
- store_artifacts:
path: htmlcov
destination: htmlcov
deploy:
docker:
- image: python:3.6
working_directory: ~/serum
steps:
- checkout
- run:
name: Prepare
command: |
pip install pipenv
pipenv sync -d
- run:
name: Build
command: |
pipenv run setup-sdist
pipenv run setup-wheel
- run:
name: Deploy
command: |
pipenv run release -u $PYPI_USER -p $PYPI_PASSWORD
workflows:
version: 2
test:
jobs:
- test:
filters:
tags:
only: /.*/
- deploy:
requires:
- test
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/