-
-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
219 additions
and
7 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 |
---|---|---|
@@ -0,0 +1,75 @@ | ||
sudo: false | ||
language: c | ||
matrix: | ||
include: | ||
- os: osx | ||
python: "2.6" | ||
env: TRAVIS_PYTHON_VERSION=2.6 | ||
- os: osx | ||
python: "2.7" | ||
env: TRAVIS_PYTHON_VERSION=2.7 | ||
- os: osx | ||
python: "3.5" | ||
env: TRAVIS_PYTHON_VERSION=3.5 | ||
- os: osx | ||
python: "pypy" | ||
env: TRAVIS_PYTHON_VERSION=pypy | ||
- os: linux | ||
language: python | ||
python: "2.6" | ||
- os: linux | ||
language: python | ||
python: "2.7" | ||
- os: linux | ||
language: python | ||
python: "3.2" | ||
- os: linux | ||
language: python | ||
python: "3.3" | ||
- os: linux | ||
language: python | ||
python: "3.4" | ||
- os: linux | ||
language: python | ||
python: "3.5" | ||
- os: linux | ||
language: python | ||
python: "pypy" | ||
- os: linux | ||
language: python | ||
python: "pypy3" | ||
install: | ||
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then | ||
if [ "$TRAVIS_PYTHON_VERSION" == "pypy" ]; then | ||
brew install pypy; | ||
/usr/local/bin/pip_pypy install flake8; | ||
/usr/local/bin/pip_pypy install https://github.com/wbond/asn1crypto/archive/master.zip; | ||
export PYTHON_BIN=/usr/local/bin/pypy; | ||
else | ||
if [ "$TRAVIS_PYTHON_VERSION" == "3.5" ]; then | ||
brew install python3; | ||
/usr/local/bin/pip3 install flake8; | ||
/usr/local/bin/pip3 install https://github.com/wbond/asn1crypto/archive/master.zip; | ||
export PYTHON_BIN=/usr/local/bin/python3; | ||
else | ||
if [ "$TRAVIS_PYTHON_VERSION" == "2.7" ]; then | ||
curl --silent --show-error https://bootstrap.pypa.io/get-pip.py | sudo /usr/bin/python2.7; | ||
sudo /usr/bin/python2.7 -W ignore -c "import pip; pip.main(['--disable-pip-version-check', '--quiet', 'install', 'flake8'])"; | ||
sudo /usr/bin/python2.7 -W ignore -c "import pip; pip.main(['--disable-pip-version-check', '--quiet', 'install', 'https://github.com/wbond/asn1crypto/archive/master.zip'])"; | ||
export PYTHON_BIN=/usr/bin/python2.7; | ||
else | ||
curl --silent --show-error https://bootstrap.pypa.io/get-pip.py | sudo /usr/bin/python2.6; | ||
sudo /usr/bin/python2.6 -W ignore -c "import pip; pip.main(['--disable-pip-version-check', '--quiet', 'install', 'flake8'])"; | ||
sudo /usr/bin/python2.6 -W ignore -c "import pip; pip.main(['--disable-pip-version-check', '--quiet', 'install', 'https://github.com/wbond/asn1crypto/archive/master.zip'])"; | ||
export PYTHON_BIN=/usr/bin/python2.6; | ||
fi | ||
fi | ||
fi | ||
else | ||
pip install --upgrade pip; | ||
pip install flake8; | ||
pip install https://github.com/wbond/asn1crypto/archive/master.zip; | ||
export PYTHON_BIN=python; | ||
fi | ||
script: | ||
- $PYTHON_BIN run.py ci |
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 |
---|---|---|
@@ -0,0 +1,70 @@ | ||
version: "{build}" | ||
environment: | ||
matrix: | ||
- PYTHON: "C:\\Python26" | ||
PYTHON_ID: "26" | ||
PYTHON_EXE: python | ||
- PYTHON: "C:\\Python26-x64" | ||
PYTHON_ID: "26-x64" | ||
PYTHON_EXE: python | ||
- PYTHON: "C:\\Python27" | ||
PYTHON_ID: "27" | ||
PYTHON_EXE: python | ||
- PYTHON: "C:\\Python27-x64" | ||
PYTHON_ID: "27-x64" | ||
PYTHON_EXE: python | ||
- PYTHON: "C:\\Python33" | ||
PYTHON_ID: "33" | ||
PYTHON_EXE: python | ||
- PYTHON: "C:\\Python33-x64" | ||
PYTHON_ID: "33-x64" | ||
PYTHON_EXE: python | ||
- PYTHON: "C:\\pypy-4.0.0-win32" | ||
PYTHON_ID: "pypy" | ||
PYTHON_EXE: pypy | ||
install: | ||
- ps: | ||
$env:PYTMP = "${env:TMP}\py"; | ||
if (!(Test-Path "$env:PYTMP")) { | ||
New-Item -ItemType directory -Path "$env:PYTMP" | Out-Null; | ||
} | ||
|
||
if ("${env:PYTHON_ID}" -eq "26") { | ||
if (!(Test-Path "${env:PYTMP}\python-2.6.6.msi")) { | ||
(New-Object Net.WebClient).DownloadFile('https://www.python.org/ftp/python/2.6.6/python-2.6.6.msi', "${env:PYTMP}\python-2.6.6.msi"); | ||
} | ||
Start-Process -FilePath msiexec.exe -ArgumentList ('/qn', '/i', "${env:PYTMP}\python-2.6.6.msi", "TARGETDIR=${env:PYTHON}") -Wait; | ||
} elseif ("${env:PYTHON_ID}" -eq "26-x64") { | ||
if (!(Test-Path "${env:PYTMP}\python-2.6.6.amd64.msi")) { | ||
(New-Object Net.WebClient).DownloadFile('https://www.python.org/ftp/python/2.6.6/python-2.6.6.amd64.msi', "${env:PYTMP}\python-2.6.6.amd64.msi"); | ||
} | ||
Start-Process -FilePath msiexec.exe -ArgumentList ('/qn', '/i', "${env:PYTMP}\python-2.6.6.amd64.msi", "TARGETDIR=${env:PYTHON}") -Wait; | ||
} elseif ("${env:PYTHON_ID}" -eq "pypy") { | ||
if (!(Test-Path "${env:PYTMP}\pypy-4.0.0-win32.zip")) { | ||
(New-Object Net.WebClient).DownloadFile('https://bitbucket.org/pypy/pypy/downloads/pypy-4.0.0-win32.zip', "${env:PYTMP}\pypy-4.0.0-win32.zip"); | ||
} | ||
7z x -y "${env:PYTMP}\pypy-4.0.0-win32.zip" -oC:\ | Out-Null; | ||
} | ||
|
||
if (!(Test-Path "${env:PYTMP}\get-pip.py")) { | ||
(New-Object Net.WebClient).DownloadFile('https://bootstrap.pypa.io/get-pip.py', "${env:PYTMP}\get-pip.py"); | ||
} | ||
|
||
if ("${env:PYTHON_ID}" -eq "pypy") { | ||
& "${env:PYTHON}\pypy.exe" "${env:PYTMP}\get-pip.py"; | ||
& "${env:PYTHON}\bin\pip.exe" --disable-pip-version-check --quiet install flake8; | ||
& "${env:PYTHON}\bin\pip.exe" --disable-pip-version-check --quiet install https://github.com/wbond/asn1crypto/archive/master.zip; | ||
} elseif ("${env:PYTHON_ID}" -eq "26" -or "${env:PYTHON_ID}" -eq "26-x64") { | ||
& "${env:PYTHON}\python.exe" -W ignore "${env:PYTMP}\get-pip.py"; | ||
& "${env:PYTHON}\python.exe" -W ignore -c "import pip; pip.main(['--disable-pip-version-check', '--quiet', 'install', 'flake8'])"; | ||
& "${env:PYTHON}\python.exe" -W ignore -c "import pip; pip.main(['--disable-pip-version-check', '--quiet', 'install', 'https://github.com/wbond/asn1crypto/archive/master.zip'])"; | ||
} else { | ||
& "${env:PYTHON}\Scripts\pip.exe" --disable-pip-version-check --quiet install flake8; | ||
& "${env:PYTHON}\Scripts\pip.exe" --disable-pip-version-check --quiet install https://github.com/wbond/asn1crypto/archive/master.zip; | ||
} | ||
- "SET PATH=%PYTHON%;%PATH%" | ||
cache: | ||
- '%TMP%\py\' | ||
build: off | ||
test_script: | ||
- cmd: "%PYTHON_EXE% run.py ci" |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# coding: utf-8 | ||
from __future__ import unicode_literals, division, absolute_import, print_function | ||
|
||
import sys | ||
|
||
from .tests import run as run_tests | ||
from .lint import run as run_lint | ||
|
||
|
||
def run(): | ||
""" | ||
Runs the linter and tests | ||
:return: | ||
A bool - if the linter and tests ran successfully | ||
""" | ||
|
||
print('Python ' + sys.version.replace('\n', '')) | ||
print('') | ||
lint_result = run_lint() | ||
print('\nRunning tests') | ||
sys.stdout.flush() | ||
tests_result = run_tests() | ||
|
||
return lint_result and tests_result |
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
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