2019-11-21 19:09:05 +01:00
|
|
|
version: 2.1
|
|
|
|
|
|
|
|
orbs:
|
|
|
|
codecov: codecov/codecov@1.0.5
|
|
|
|
|
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
test:
|
|
|
|
jobs:
|
|
|
|
- py38
|
|
|
|
- py37
|
|
|
|
- black
|
|
|
|
- check-manifest
|
|
|
|
- flake8
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
py38: &test-template
|
|
|
|
docker:
|
|
|
|
- image: mopidy/ci-python:3.8
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- restore_cache:
|
|
|
|
name: Restoring tox cache
|
2019-11-21 21:25:51 +01:00
|
|
|
key: tox-v1-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.cfg" }}
|
2019-11-21 19:09:05 +01:00
|
|
|
- run:
|
|
|
|
name: Run tests
|
|
|
|
command: |
|
|
|
|
tox -e $CIRCLE_JOB -- \
|
|
|
|
--junit-xml=test-results/pytest/results.xml \
|
|
|
|
--cov-report=xml
|
|
|
|
- save_cache:
|
|
|
|
name: Saving tox cache
|
2019-11-21 21:25:51 +01:00
|
|
|
key: tox-v1-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.cfg" }}
|
2019-11-21 19:09:05 +01:00
|
|
|
paths:
|
|
|
|
- ./.tox
|
|
|
|
- ~/.cache/pip
|
|
|
|
- codecov/upload:
|
|
|
|
file: coverage.xml
|
|
|
|
- store_test_results:
|
|
|
|
path: test-results
|
|
|
|
|
|
|
|
py37:
|
|
|
|
<<: *test-template
|
|
|
|
docker:
|
|
|
|
- image: mopidy/ci-python:3.7
|
|
|
|
|
|
|
|
black: *test-template
|
|
|
|
|
|
|
|
check-manifest: *test-template
|
|
|
|
|
2020-01-23 12:49:37 +01:00
|
|
|
flake8: *test-template
|
|
|
|
|