Files
spleeter/.circleci/config.yml
2019-11-08 19:23:26 -05:00

75 lines
2.1 KiB
YAML

version: 2
jobs:
test-3.6:
docker:
- image: python:3.6
working_directory: ~/spleeter
steps:
- checkout
- restore_cache:
keys:
- python-3.6-cache-{{ checksum requirements.txt }}
- python-3.6-cache-
- run:
name: install ffmpeg
command: apt-get update && apt-get install -y ffmpeg
- run:
name: install python dependencies
command: pip install -r requirements.txt && pip install pytest
- save_cache:
key: python-3.6-cache-{{ checksum requirements.txt }}
paths:
- "/usr/local/bin"
- "/usr/local/lib/python3.6/site-packages"
- run:
name: pytest
command: pytest -W ignore::FutureWarning -W ignore::DeprecationWarning
test-3.7:
docker:
- image: python:3.7
working_directory: ~/spleeter
steps:
- checkout
- restore_cache:
keys:
- python-3.7-cache-{{ checksum requirements.txt }}
- python-3.7-cache-
- run:
name: install ffmpeg
command: apt-get update && apt-get install -y ffmpeg
- run:
name: install python dependencies
command: pip install -r requirements.txt && pip install pytest
- save_cache:
key: python-3.7-cache-{{ checksum requirements.txt }}
paths:
- "/usr/local/bin"
- "/usr/local/lib/python3.7/site-packages"
- run:
name: pytest
command: pytest -W ignore::FutureWarning -W ignore::DeprecationWarning
pypi-deploy:
docker:
- image: python:3
steps:
- checkout
- run:
name: package
command: python setup.py sdist
- run:
name: upload to PyPi
command: pip install twine && twine upload dist/*
workflows:
version: 2
test-and-deploy:
jobs:
- test-3.6
- test-3.7
- pypi-deploy:
filters:
branches:
only:
- master
requires:
- test-3.6
- test-3.7