Skip to content

Commit

Permalink
chore: split coverage versions in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
TheKevJames committed Dec 31, 2019
1 parent bcac237 commit 062de68
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 16 deletions.
82 changes: 71 additions & 11 deletions .circleci/config.yml
Expand Up @@ -13,13 +13,26 @@ jobs:
# TODO: figure out `<<parameters.docker_image>>.replace('.','')`
tox_environment:
type: string
cov_version:
default: ""
type: string
steps:
- run: apk add --no-cache gcc git libffi-dev musl-dev openssh-client openssl-dev
- checkout
- run: pip install tox tox-factor
- run: tox -f <<parameters.tox_environment>>
- run: tox -e coveralls
- unless:
condition: <<parameters.cov_version>>
steps:
- run: tox -f <<parameters.tox_environment>>
- run: tox -e coveralls41
- when:
condition: <<parameters.cov_version>>
steps:
- run: tox -f <<parameters.tox_environment>>-cov<<parameters.cov_version>>
- run: tox -e coveralls<<parameters.cov_version>>

# TODO: by introspecting `docker_image` (or `tox_environment`), we could
# these job definitions
toxpypy:
docker:
- image: pypy:<<parameters.docker_image>>
Expand All @@ -29,11 +42,22 @@ jobs:
# TODO: figure out `<<parameters.docker_image>>.replace('.','')`
tox_environment:
type: string
cov_version:
default: ""
type: string
steps:
- checkout
- run: pip install tox tox-factor
- run: tox -f <<parameters.tox_environment>>
- run: tox -e coveralls
- unless:
condition: <<parameters.cov_version>>
steps:
- run: tox -f <<parameters.tox_environment>>
- run: tox -e coveralls41
- when:
condition: <<parameters.cov_version>>
steps:
- run: tox -f <<parameters.tox_environment>>-cov<<parameters.cov_version>>
- run: tox -e coveralls<<parameters.cov_version>>

workflows:
run-jobs:
Expand All @@ -54,17 +78,35 @@ workflows:
docker_image: '3.5'
tox_environment: py35
- toxpy:
name: test-py3.6
name: test-py3.6-cov4
docker_image: '3.6'
tox_environment: py36
cov_version: '41'
- toxpy:
name: test-py3.6-cov5
docker_image: '3.6'
tox_environment: py36
cov_version: '5'
- toxpy:
name: test-py3.7
name: test-py3.7-cov4
docker_image: '3.7'
tox_environment: py37
cov_version: '41'
- toxpy:
name: test-py3.7-cov5
docker_image: '3.7'
tox_environment: py37
cov_version: '5'
- toxpy:
name: test-py3.8-cov4
docker_image: '3.8'
tox_environment: py38
cov_version: '41'
- toxpy:
name: test-py3.8
name: test-py3.8-cov5
docker_image: '3.8'
tox_environment: py38
cov_version: '5'

- toxpypy:
name: test-pypy2-5
Expand All @@ -80,14 +122,32 @@ workflows:
tox_environment: pypy

- toxpypy:
name: test-pypy3-5
name: test-pypy3-5-cov4
docker_image: 3-5
tox_environment: pypy3
cov_version: '41'
- toxpypy:
name: test-pypy3-6
name: test-pypy3-5-cov5
docker_image: 3-5
tox_environment: pypy3
cov_version: '5'
- toxpypy:
name: test-pypy3-6-cov4
docker_image: 3-6
tox_environment: pypy3
cov_version: '41'
- toxpypy:
name: test-pypy3-6-cov5
docker_image: 3-6
tox_environment: pypy3
cov_version: '5'
- toxpypy:
name: test-pypy3-7
name: test-pypy3-7-cov4
docker_image: 3-7
tox_environment: pypy37
tox_environment: pypy3
cov_version: '41'
- toxpypy:
name: test-pypy3-7-cov5
docker_image: 3-7
tox_environment: pypy3
cov_version: '5'
16 changes: 11 additions & 5 deletions tox.ini
Expand Up @@ -5,9 +5,9 @@ envlist = py{27,34,35,py}-cov{3,4,41}-{default,pyyaml},py{36,37,38,py3}-cov{41,5
python =
2.7: py27
3.5: py35
3.6: py36
3.7: py37
3.8: py38
3.6: py36-cov5
3.7: py37-cov5
3.8: py38-cov5

[testenv]
passenv = *
Expand All @@ -25,8 +25,14 @@ commands =
coverage run --branch --source=coveralls -m pytest tests/
coverage report -m

[testenv:coveralls]
[testenv:coveralls41]
deps =
coverage<6.0
coverage>=4.1,<5.0
commands =
coveralls --verbose

[testenv:coveralls5]
deps =
coverage>=5.0,<6.0
commands =
coveralls --verbose

0 comments on commit 062de68

Please sign in to comment.