Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' into issue_115
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank Jheng committed Apr 4, 2019
2 parents 1a7113e + 023be2e commit 35679f1
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 14 deletions.
17 changes: 10 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,27 @@ jobs:
- stage: test
os: osx
language: generic
env: PYTHON_VERSION=3.4.8
env: PYTHON_VERSION=3.4.9
- stage: test
os: osx
language: generic
env: PYTHON_VERSION=3.5.5
env: PYTHON_VERSION=3.5.6
- stage: test
os: osx
language: generic
env: PYTHON_VERSION=3.6.4

env: PYTHON_VERSION=3.6.8
- stage: test
os: osx
language: generic
env: PYTHON_VERSION=3.7.2

before_install:
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then sh ci/install_python_for_osx.sh; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then source ~/venv/bin/activate; fi

# workaround for Travis CI stdout write error
# ref: <https://github.com/travis-ci/travis-ci/issues/4704#issuecomment-348435959>
- python -c 'import os,sys,fcntl; flags = fcntl.fcntl(sys.stdout, fcntl.F_GETFL); fcntl.fcntl(sys.stdout, fcntl.F_SETFL, flags&~os.O_NONBLOCK);'
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then sh ci/install_python_for_osx.sh; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then source ~/venv/bin/activate; fi
- python --version # Check the specifically installed Python version

install:
- "pip install -U setuptools" # for upgrade issue with setuptools and CPython 3.6 on Travis CI
Expand Down
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ requests = "==2.21.0"
coverage = "==4.5.3"
flake8 = "==3.7.7"
pyjokes = "==0.5.0"
pytest = "==4.3.1"
pytest = "==4.4.0"
pytest-cov = "==2.6.1"
pytest-flake8 = "==1.0.4"
6 changes: 3 additions & 3 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 13 additions & 2 deletions ci/install_python_for_osx.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
#!/usr/bin/sh

set -ev

curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash
~/.pyenv/bin/pyenv install $PYTHON_VERSION
~/.pyenv/versions/$PYTHON_VERSION/bin/python3 --version

# Make it use openssl only
brew uninstall openssl@1.1

# print openssl path
brew --prefix openssl

# Install specific version of Python via pyenv
~/.pyenv/bin/pyenv install -v $PYTHON_VERSION

# Create venv with the specific Python version
~/.pyenv/versions/$PYTHON_VERSION/bin/python3 -m venv ~/venv
2 changes: 1 addition & 1 deletion requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
coverage==4.5.3
flake8==3.7.7
pyjokes==0.5.0
pytest==4.3.1
pytest==4.4.0
pytest-cov==2.6.1
pytest-flake8==1.0.4

0 comments on commit 35679f1

Please sign in to comment.