diff options
author | Seth Morton <seth.m.morton@gmail.com> | 2019-02-26 20:31:59 -0800 |
---|---|---|
committer | Seth Morton <seth.m.morton@gmail.com> | 2019-02-27 21:30:34 -0800 |
commit | 34fd14790aedfdad7e7af1455ea688ccc4165d63 (patch) | |
tree | 34fe09faf4846b682ec2d062b518256b699127be | |
parent | 4219f6d1740de68b09721febdb1b2c8555457f81 (diff) | |
download | natsort-34fd14790aedfdad7e7af1455ea688ccc4165d63.tar.gz |
Add MacOS support to Travis-CI
This uses a script that was designed to run pyenv in Travis-CI,
so the hope is that this works a bit better. Additionally, this
automatically handles caching of the installed python so subequent jobs
are hopefully more efficient.
ICU is not tested for MacOS because it is known that ICU solves all
the locale issues in a cross-platform way, so it is only necessary to
test against native locale in MacOS.
-rw-r--r-- | .travis.yml | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml index 468ab0a..acda714 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,10 @@ dist: xenial sudo: false language: python -cache: pip +cache: + - pip + - directories: + - $HOME/.pyenv_cache python: - 2.7 - 3.4 @@ -35,6 +38,20 @@ jobs: - language-pack-de - language-pack-en + # For MacOS, only run Python 3.7 without "icu" because native locale + # handling is poor on MacOS and should be validated. + - python: "3.7" + language: sh + os: osx + env: + - WITH_EXTRAS="" + - TOXENV=py37 + - PYENV_VERSION="3.7.1" + before_install: + - export PYENV_VERSION_STRING="Python ${PYENV_VERSION}" + - wget https://github.com/praekeltfoundation/travis-pyenv/releases/download/0.4.0/setup-pyenv.sh + - source setup-pyenv.sh + # This "code-quality" stage does static analysis and formatting checks. # Platform- and Python-version-independent. - stage: code-quality @@ -50,7 +67,7 @@ jobs: install: - pip install -U pip -- pip install tox-travis codacy-coverage codecov +- pip install tox tox-travis codacy-coverage codecov script: - tox |