Skip to content

Commit

Permalink
updated testing and uploading to pypi testing conditionally
Browse files Browse the repository at this point in the history
  • Loading branch information
akaszynski committed Feb 14, 2020
1 parent 472737e commit 6f8dfbc
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .ci/build_wheels.sh
Expand Up @@ -8,7 +8,7 @@ pys=(/opt/python/*/bin)
pys=(${pys[@]//*27*/})
pys=(${pys[@]//*34*/})
# pys=(${pys[@]//*35*/})
pys=(${pys[@]//*38*/})
pys=(${pys[@]//*38*/}) # waiting for vtk on python 3.8

PYBIN="/opt/python/cp37-cp37m/bin"

Expand All @@ -22,6 +22,6 @@ for PYBIN in "${pys[@]}"; do

"${PYBIN}/pip" install -r /io/requirements_test.txt
"${PYBIN}/pip" install pytest-azurepipelines # extra for azure
"${PYBIN}/pytest" /io/tests
"${PYBIN}/pytest" /io/tests -v --cov pymeshfix --cov-report html

done
4 changes: 4 additions & 0 deletions .gitignore
Expand Up @@ -27,3 +27,7 @@ uploadpypi.sh
docs/_build
docs/images
docs/examples

# coverage reports
htmlcov/
.coverage
25 changes: 24 additions & 1 deletion azure-pipelines.yml
Expand Up @@ -11,6 +11,10 @@ trigger:
include:
- '*'

# Build multiple version of python linux wheels in single job.
# As we have to start docker and download a docker image, it's more
# efficient to have multiple builds on one image, especially
# considering we share this with pyvista.
jobs:
- job: Linux
strategy:
Expand Down Expand Up @@ -40,4 +44,23 @@ jobs:
done
cd ..
displayName: Build wheels
# - template: /.ci/azure-publish-dist.yml
- script: |
pip install twine wheel
twine upload dist/*.whl --skip-existing
displayName: 'Upload to PyPi'
condition: contains(variables['Build.SourceBranch'], 'refs/tags/')
env:
TWINE_USERNAME: $(twine.username)
TWINE_PASSWORD: $(twine.password)
TWINE_REPOSITORY_URL: "https://upload.pypi.org/legacy/"

- script: |
pip install twine wheel
twine upload dist/*.whl --skip-existing
displayName: 'Upload to Testing PyPi'
condition: not(contains(variables['Build.SourceBranch'], 'refs/tags/'))
env:
TWINE_USERNAME: $(twine.username)
TWINE_PASSWORD: $(twine.password)
TWINE_REPOSITORY_URL: "https://test.pypi.org/legacy/"
6 changes: 5 additions & 1 deletion pytest.ini
@@ -1,5 +1,9 @@
[pytest]
junit_family=legacy
filterwarnings =
ignore::FutureWarning
ignore::PendingDeprecationWarning
ignore::DeprecationWarning
ignore::DeprecationWarning
# bogus numpy ABI warning (see numpy/#432)
ignore:.*numpy.dtype size changed.*:RuntimeWarning
ignore:.*numpy.ufunc size changed.*:RuntimeWarning

0 comments on commit 6f8dfbc

Please sign in to comment.