-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Enabled build on Linux (Python 3.6 + 3.7), MacOS (Python 3.7), Windows (Python 3.7) * Added coverage test and badge * Auto deploy to PyPI when released a new tag
- Loading branch information
1 parent
95bc708
commit d856185
Showing
4 changed files
with
133 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,5 @@ mlchain.egg-info | |
*.idea | ||
.pyc | ||
test/* | ||
.pytest_cache | ||
.pytest_cache | ||
**/.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,139 @@ | ||
language: python | ||
arch: | ||
- amd64 | ||
python: | ||
- 3.6 | ||
- 3.7 | ||
|
||
stages: | ||
- sanity_check | ||
- build | ||
- test | ||
|
||
|
||
jobs: | ||
include: | ||
# ====== WINDOWS ========= | ||
- name: "Python 3.6.8 on Windows" | ||
os: windows # Windows 10.0.17134 N/A Build 17134 | ||
language: shell # 'language: python' is an error on Travis CI Windows | ||
- stage: sanity_check | ||
name: "Sanity check" | ||
os: linux | ||
python: 3.7 | ||
install: | ||
- pip install -U pylint pylint-exit | ||
script: | ||
- pylint --output-format=text *.py || pylint-exit $? | ||
|
||
- stage: build | ||
name: "Build on Python 3.7 Linux" | ||
os: linux | ||
python: 3.7 | ||
install: | ||
- pip install -U scikit-build awscli pip | ||
- pip install -U -r requirements.txt | ||
script: | ||
- python setup.py bdist_wheel | ||
- python setup.py install | ||
|
||
- stage: build | ||
name: "Build on Python 3.6 Linux" | ||
os: linux | ||
python: 3.6 | ||
install: | ||
- pip install -U scikit-build awscli pip | ||
- pip install -U -r requirements.txt | ||
script: | ||
- python setup.py bdist_wheel | ||
- python setup.py install | ||
|
||
- stage: build | ||
name: "Build on Python 3.7 MacOS" | ||
os: osx | ||
language: minimal | ||
install: | ||
- pip3 install -U scikit-build awscli pip | ||
- pip3 install -U -r requirements.txt | ||
script: | ||
- python3 setup.py bdist_wheel | ||
- python3 setup.py install | ||
|
||
- stage: build | ||
name: "Build on Python 3.7 Windows" | ||
os: windows | ||
language: shell | ||
before_install: | ||
- choco install python --version 3.6.8 | ||
- python -m pip install scikit-build | ||
- python -m pip install pytest pylint | ||
- choco install python --version 3.7.4 | ||
- export PATH="/c/Python37:/c/Python37/Scripts:$PATH" | ||
install: | ||
- python --version | ||
- python -m pip install . | ||
- python -m pip install -U scikit-build awscli pip --user | ||
- python -m pip install -U -r requirements.txt --user | ||
|
||
script: | ||
- python setup.py bdist_wheel | ||
- python setup.py install | ||
|
||
|
||
- stage: test | ||
name: "Test on Python 3.7 Linux" | ||
os: linux | ||
python: 3.7 | ||
install: | ||
- pip install -U scikit-build pytest coverage codecov pip | ||
- pip install -U attrs | ||
script: | ||
- pip install . | ||
- python -m coverage run --source=. -m unittest discover | ||
- python -m coverage report | ||
after_success: | ||
- codecov | ||
|
||
|
||
- stage: test | ||
name: "Test on Python 3.6 Linux" | ||
os: linux | ||
python: 3.6 | ||
install: | ||
- pip install -U scikit-build pytest coverage codecov pip | ||
- pip install -U attrs | ||
script: | ||
- pylint mlchain | ||
- pytest tests/ | ||
env: PATH=/c/Python36:/c/Python36/Scripts:$PATH | ||
- name: "Python 3.7.4 on Windows" | ||
os: windows # Windows 10.0.17134 N/A Build 17134 | ||
language: shell # 'language: python' is an error on Travis CI Windows | ||
- pip install . | ||
- python -m coverage run --source=. -m unittest discover | ||
- python -m coverage report | ||
after_success: | ||
- codecov | ||
|
||
|
||
- stage: test | ||
name: "Test on Python 3.7 MacOS" | ||
os: osx | ||
language: minimal | ||
install: | ||
- pip3 install -U scikit-build pytest coverage codecov pip | ||
- pip3 install -U attrs | ||
script: | ||
- pip3 install . | ||
- python3 -m coverage run --source=. -m unittest discover | ||
- python3 -m coverage report | ||
after_success: | ||
- codecov | ||
|
||
- stage: test | ||
name: "Test on Python 3.7 Windows" | ||
os: windows | ||
language: shell | ||
before_install: | ||
- choco install python --version 3.7.4 | ||
- python -m pip install scikit-build | ||
- python -m pip install pytest pylint | ||
- export PATH="/c/Python37:/c/Python37/Scripts:$PATH" | ||
install: | ||
- python --version | ||
- python -m pip install . | ||
- python -m pip install -U scikit-build pytest coverage codecov pip | ||
- python -m pip install -U attrs | ||
script: | ||
- pylint mlchain | ||
- pytest tests/ | ||
env: PATH=/c/Python37:/c/Python37/Scripts:$PATH | ||
|
||
before_install: | ||
- sudo apt-get update | ||
- sudo apt-get install -y software-properties-common | ||
- sudo apt-get update | ||
- sudo apt-get install -y --no-install-recommends build-essential gcc | ||
- pip install scikit-build | ||
- pip install pytest pylint | ||
install: | ||
- python --version | ||
- pip install . | ||
script: | ||
- pylint mlchain | ||
- pytest tests/ | ||
- python -m pip install . | ||
- python -m coverage run --source=. -m unittest discover | ||
- python -m coverage report | ||
after_success: | ||
- codecov | ||
|
||
deploy: | ||
- provider: pypi | ||
username: __token__ | ||
password: | ||
secure: lEK5DTFYmn2vkeP8OrG8CPgUOH/PvhO76OO5F2/K3HbQxJZLH3Vsmzk/mRsY1pIC52XpGLDSg/8d62V9bu2WNReLRQJZ1zIgKSswvf4USrsd0axGwIbJyuX+vr81/x4j4rQr3ohfb2zOIit7JoDrRugwBICSAEukNfXoOZdN6wVn4zpLsW/bdlrNlIsNmhzUBKfurRMPEqsSE1Bq2dDGmyd4KNiZlaJF4PEgNQHfV9qwW2+j/ky4ulCzFgIfxKUpIfvUPFN3Uw3HdaJAaOH6h+S84hvi30xwD8bT8os990fK0zZ/sW5e0ogRckmkGh3jDJcXzyCPetAABMkUjwTrIkehQ2I2QhT49V0+Qqq3A3iJFAGxufl3HEYNY4ZVxo7PXMBIkmA6TdKomhPLh1nKeQTaFomSvoY/Usnc5pF1Va5vhHUz2mGeUgnbR0kQPN2d3yF6hVvl2TnM4Ml0YK2sQa4og4xYOouBGqJsATTZ7OEdG/Iha1KpQRwkHaWs+FShGs1UL0UZO5+FYVSd6va3i1IPxZLoZzJBPscclKBJbrtfup7cWRO2LEeS1uzS0NEKGTmrZLmOW8m9o0Pt+F61pU8meG3O+n0CxYGrytUSNvCrMA0+ZT9DY0hF9Q08w7AASG+zZVarwhnFDakeNq91Z1GLGxB+mD3vIa5mslZGYMw= | ||
on: | ||
tags: true | ||
branch: master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters