Skip to content

Commit

Permalink
Merge pull request #387 from GavinHuttley/master
Browse files Browse the repository at this point in the history
TST: python3.8 support via added tox environment and azure, fixes #355
  • Loading branch information
GavinHuttley committed Nov 14, 2019
2 parents a30e285 + 94f1a13 commit e5d5503
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 8 deletions.
30 changes: 24 additions & 6 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ trigger:

variables:
CODECOV_TOKEN: 504b0637-b4c1-4991-bc79-7a29aee41b44
CIBW_BUILD: cp36-* cp37-*
CIBW_BUILD: cp36-* cp37-* cp38-*
CIBW_BEFORE_BUILD: python -m pip install --upgrade pip

jobs:
Expand All @@ -14,6 +14,12 @@ jobs:
- bash: |
python -m pip install --upgrade pip
python -m pip install .[dev] codecov
- task: UsePythonVersion@0
inputs:
versionSpec: '3.8'
- bash: |
tox -e py38
codecov
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
Expand All @@ -33,6 +39,12 @@ jobs:
- bash: |
python -m pip install --upgrade pip
python -m pip install .[dev] codecov
- task: UsePythonVersion@0
inputs:
versionSpec: '3.8'
- bash: |
tox -e py38
codecov
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
Expand All @@ -59,10 +71,12 @@ jobs:
- job: Linux_Build
pool: {vmImage: 'ubuntu-latest'}
steps:
- task: UsePythonVersion@0
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.6'}}
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.7'}}
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.8'}}
- bash: |
python -m pip install --upgrade pip
python -m pip install cibuildwheel==0.11.1 numpy
python -m pip install cibuildwheel==1.0.0 numpy
cibuildwheel --output-dir wheelhouse .
python setup.py sdist
cp dist/*.gz wheelhouse/.
Expand All @@ -72,10 +86,12 @@ jobs:
- job: MacOS_Build
pool: {vmImage: 'macos-latest'}
steps:
- task: UsePythonVersion@0
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.6'}}
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.7'}}
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.8'}}
- bash: |
python -m pip install --upgrade pip
python -m pip install cibuildwheel==0.11.1 numpy
python -m pip install cibuildwheel==1.0.0 numpy
cibuildwheel --output-dir wheelhouse .
- task: PublishBuildArtifacts@1
inputs: {pathtoPublish: 'wheelhouse'}
Expand All @@ -87,9 +103,11 @@ jobs:
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.6', architecture: x64}}
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.7', architecture: x86}}
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.7', architecture: x64}}
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.8', architecture: x86}}
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.8', architecture: x64}}
- bash: |
python -m pip install --upgrade pip
python -m pip install cibuildwheel==0.11.1 numpy
python -m pip install cibuildwheel==1.0.0 numpy
cibuildwheel --output-dir wheelhouse .
- task: PublishBuildArtifacts@1
inputs: {pathtoPublish: 'wheelhouse'}
10 changes: 8 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py36, py37, py37mpi, doctest
envlist = py36, py37, py37mpi, py38, doctest

[testenv]
deps = numpy
Expand All @@ -12,7 +12,7 @@ deps = numpy
doctest: nbconvert
doctest: jupyter_client
doctest: ipykernel
py{36,37}: pytest-cov
py{36,37,38}: pytest-cov
py37mpi: mpi4py

[testenv:doctest]
Expand All @@ -26,6 +26,12 @@ commands =
python doctest_rsts.py -1 -f examples -s ipynb
python doctest_rsts.py -1 -f draw -s ipynb

[testenv:py38]
changedir = tests
basepython = python3.8
commands =
pytest --cov-report xml --cov=cogent3 ./ --ignore=test_mpi.py

[testenv:py37]
changedir = tests
basepython = python3.7
Expand Down

0 comments on commit e5d5503

Please sign in to comment.