Skip to content

Commit

Permalink
Removed build on macOS and Windows because tests are/were only perfor…
Browse files Browse the repository at this point in the history
…med on Linux.
  • Loading branch information
mcuntz committed Jun 16, 2020
1 parent 3bd7bcf commit 5feeb80
Showing 1 changed file with 24 additions and 42 deletions.
66 changes: 24 additions & 42 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,76 +4,58 @@ python: 3.8

jobs:
include:
# perform a linux build
# perform a Linux build
- services: docker
env:
# perform tests (cover=on)
- COVER="on"
- PYTHON=python3
- PIP=pip
# and a mac build
- os: osx
language: shell
env:
- COVER="off"
- PYTHON=python3
- PIP=pip
# and a windows build
- os: windows
language: shell
env:
- COVER="off"
- PYTHON=python
- PIP=pip
before_install:
- choco install python --version 3.8.2
- export PATH="/c/Python38:/c/Python38/Scripts:$PATH"

env:
global:
- TWINE_USERNAME=mcuntz
# Note: TWINE_PASSWORD is set in Travis settings

install:
- $PYTHON -m $PIP install -U pip
- $PYTHON -m $PIP install -U setuptools
- $PYTHON -m $PIP install -U pytest
- $PYTHON -m $PIP install -U pytest-cov
- $PYTHON -m $PIP install -U coveralls
- $PYTHON -m $PIP install -r tests/requirements_test.txt
- $PYTHON -m $PIP install -r docs/requirements.txt
- $PYTHON -m $PIP install cibuildwheel
- $PYTHON -m $PIP install twine
- python3 -m pip install -U pip
- python3 -m pip install -U setuptools
- python3 -m pip install -U pytest
- python3 -m pip install -U pytest-cov
- python3 -m pip install -U coveralls
- python3 -m pip install -r tests/requirements_test.txt
- python3 -m pip install -r docs/requirements.txt
- python3 -m pip install cibuildwheel
- python3 -m pip install twine

script:
# create wheels
- $PYTHON -m cibuildwheel --output-dir wheelhouse
- python3 -m cibuildwheel --output-dir wheelhouse
# create source dist for pypi and create coverage
- |
if [[ $COVER == "on" ]] ; then
$PYTHON -m $PIP install -U pytest
$PYTHON -m $PIP install -U pytest-cov
$PYTHON -m $PIP install -U coveralls
$PYTHON -m $PIP install -r tests/requirements_test.txt
python3 -m pip install -U pytest
python3 -m pip install -U pytest-cov
python3 -m pip install -U coveralls
python3 -m pip install -r tests/requirements_test.txt
rm -rf dist
$PYTHON setup.py sdist
python3 setup.py sdist
export PYTHONPATH=${PYTHONPATH}:${PWD}
$PYTHON -m pytest --cov pyeee --cov-report term-missing -v tests/
$PYTHON -m coveralls
python3 -m pytest --cov pyeee --cov-report term-missing -v tests/
python3 -m coveralls
fi
after_success:
# pypi upload (test always, official on TAG)
- $PYTHON -m $PIP install -U twine
- $PYTHON -m twine upload --verbose --skip-existing --repository-url https://test.pypi.org/legacy/ wheelhouse/*.whl
- python3 -m pip install -U twine
- python3 -m twine upload --verbose --skip-existing --repository-url https://test.pypi.org/legacy/ wheelhouse/*.whl
- |
if [[ $COVER == "on" ]] ; then
$PYTHON -m twine upload --verbose --skip-existing --repository-url https://test.pypi.org/legacy/ dist/*.tar.gz
python3 -m twine upload --verbose --skip-existing --repository-url https://test.pypi.org/legacy/ dist/*.tar.gz
fi
- |
if [[ $TRAVIS_TAG ]] ; then
$PYTHON -m twine upload --skip-existing wheelhouse/*.whl
python3 -m twine upload --skip-existing wheelhouse/*.whl
if [[ $COVER == "on" ]] ; then
$PYTHON -m twine upload --skip-existing dist/*.tar.gz
python3 -m twine upload --skip-existing dist/*.tar.gz
fi
fi
Expand Down

0 comments on commit 5feeb80

Please sign in to comment.