53 lines
1.1 KiB
YAML
53 lines
1.1 KiB
YAML
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
|
|
key: tox-v1-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.cfg" }}
|
|
- 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
|
|
key: tox-v1-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.cfg" }}
|
|
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
|
|
|
|
flake8: *test-template
|
|
|