From 837233b129382d7d3ec745a9dd06dc9e05a5a3b7 Mon Sep 17 00:00:00 2001 From: Justin Moen Date: Sat, 16 Jul 2016 11:09:20 -0700 Subject: [PATCH] Travis multi-os --- .travis.yml | 26 ++++++++++++++++++++------ install.sh | 30 ++++++++++++++++++++++++++++++ requirements-tests.txt | 3 ++- 3 files changed, 52 insertions(+), 7 deletions(-) create mode 100755 install.sh diff --git a/.travis.yml b/.travis.yml index a676d4473..8ac963b56 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,25 @@ language: python -python: - - 3.4 - - 3.5 - - "nightly" + +matrix: + include: + - os: linux + python: "nightly" + env: TOXENV=py36 + - os: linux + python: 3.5 + env: TOXENV=py35 + - os: linux + python: 3.4 + env: TOXENV=py34 + - os: osx + language: generic + env: TOXENV=py35 + - os: osx + language: generic + env: TOXENV=py34 install: - - pip install -r requirements-tests.txt + - ./install.sh script: - - coverage run --source xonsh -m py.test -q + - python3 -m coverage run --source xonsh -m py.test -v --timeout=10 tests/ after_success: - codecov diff --git a/install.sh b/install.sh new file mode 100755 index 000000000..a7b82d4ac --- /dev/null +++ b/install.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +if [[ $TRAVIS_OS_NAME == 'osx' ]]; then + case "${TOXENV}" in + py35) + # Install Python 3.5 from source + wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tar.xz + tar -xf Python-3.5.2.tar.xz + cd Python-3.5.2 + ./configure + make + make install + cd .. + rm -rf Python-3.5.2 + ;; + py34) + # Install Python 3.4 from source + wget https://www.python.org/ftp/python/3.4.3/Python-3.4.3.tar.xz + tar -xf Python-3.4.3.tar.xz + cd Python-3.4.3 + ./configure + make + make install + cd .. + rm -rf Python-3.4.3 + ;; + esac +fi + +pip3 install -r requirements-tests.txt diff --git a/requirements-tests.txt b/requirements-tests.txt index db2a85c2b..a422d7f80 100644 --- a/requirements-tests.txt +++ b/requirements-tests.txt @@ -1,5 +1,6 @@ ply -pytest +pytest==2.9.1 +pytest-timeout prompt-toolkit pygments coverage