Skip to content

Commit

Permalink
Merge ab1a04f into 9e08bee
Browse files Browse the repository at this point in the history
  • Loading branch information
webknjaz committed Jan 16, 2019
2 parents 9e08bee + ab1a04f commit 6e06bcc
Showing 1 changed file with 76 additions and 7 deletions.
83 changes: 76 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
conditions: v1

os: linux
dist: trusty
sudo: false
group: edge
dist: xenial

language: python
python:
- 2.7
- 3.4
- 3.5
- &mainstream_python 3.6
- 3.6
- &mainstream_python 3.7
- nightly

install:
Expand All @@ -35,14 +34,84 @@ stages:
- name: deploy
if: tag IS present

cache:
pip: true
directories:
- $HOME/.cache/pre-commit
- $HOME/.pre-commit
- $HOME/virtualenv/python$(python -c 'import platform; print(platform.python_version())')
- $HOME/Library/Caches/Homebrew
- $PYTHON_INSTALLER_DIR_PATH

before_cache:
- rm -f $HOME/.cache/pip/log/debug.log

env:
global:
PYTHON_INSTALLER_DIR_PATH: ${HOME}/.python-installers

.mixtures:
- &macos-job
os: osx
osx_image: xcode8.3
language: generic
before_install: &install-from-python_org
- export PYTHON_VERSION_LONG=$(git ls-remote --tags git://github.com/python/cpython.git "${PYTHON_VERSION}*" "v${PYTHON_VERSION}*" | grep -v '\^{}$' | awk '{print$2}' | sed 's#^refs/tags/##;s#^v##' | grep -v '[abcepr]' | tail -n1)
- export PYTHON_VERSION_SHORT=$(echo ${PYTHON_VERSION_LONG} | awk -F. '{print$1"."$2}')
- echo "Selected version vars are:"
- echo "PYTHON_VERSION=${PYTHON_VERSION}"
- echo "PYTHON_VERSION_SHORT=${PYTHON_VERSION_SHORT}"
- echo "PYTHON_VERSION_LONG=${PYTHON_VERSION_LONG}"
- export PYTHON_INSTALL_PATH="/Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION_SHORT}"
- export PYTHON_INSTALL_EXE="${PYTHON_INSTALL_PATH}/bin/python${PYTHON_VERSION_SHORT}"
- export PATH="${PYTHON_INSTALL_PATH}/bin:${PATH}"
- export PYTHON_VENV_PATH="${HOME}/virtualenv/python${PYTHON_VERSION_SHORT}"
- export PYTHON_INSTALLER_PATH="${PYTHON_INSTALLER_DIR_PATH}/python-${PYTHON_VERSION_LONG}.pkg"
- echo "PYTHON_INSTALLER_PATH=${PYTHON_INSTALLER_PATH}"
- env
- curl -Lo "${PYTHON_INSTALLER_PATH}" -C - "https://www.python.org/ftp/python/${PYTHON_VERSION_LONG}/python-${PYTHON_VERSION_LONG}-macosx10.6.pkg" && sudo installer -verboseR -dumplog -pkg "${PYTHON_INSTALLER_PATH}" -target /
- ls "${PYTHON_INSTALL_PATH}/bin"
- export VENV_CMD=$(command -v virtualenv 2>/dev/null || command -v pyvenv 2>/dev/null || echo "${PYTHON_INSTALL_EXE} -m venv")
- |
if [[ "${VENV_CMD}" =~ virtualenv$ ]]
then
export VENV_CMD="${VENV_CMD} -p '${PYTHON_INSTALL_EXE}'"
fi
- echo "${VENV_CMD}"
- ${VENV_CMD} "${PYTHON_VENV_PATH}"
- . "${PYTHON_VENV_PATH}/bin/activate"
- curl https://bootstrap.pypa.io/get-pip.py | python
- python --version
- pip --version

jobs:
fast_finish: true
allow_failures:
- python: nightly

include:
- python: 3.7
dist: xenial
sudo: required
- <<: *macos-job
name: Running tests against Python 3.7 env under macOS 10.13
env:
PYTHON_VERSION: 3.7
- <<: *macos-job
name: Running tests against Python 2.7 env under macOS 10.13
env:
PYTHON_VERSION: 2.7

- <<: *macos-job
name: Running tests against Python 3.6 env under macOS 10.13
env:
PYTHON_VERSION: 3.6
- <<: *macos-job
name: Running tests against Python 3.5 env under macOS 10.13
env:
PYTHON_VERSION: 3.5
- <<: *macos-job
name: Running tests against Python 3.4 env under macOS 10.13
env:
PYTHON_VERSION: 3.4

- stage: deploy
python: *mainstream_python
install: skip
Expand Down

0 comments on commit 6e06bcc

Please sign in to comment.