Skip to content

Commit 32c8744

Browse files
cclaussrvagg
authored andcommitted
test: fix macOS Travis on Python 2.7 & 3.7
Uses `pyenv` to manage MacOS python versions since its not included in the environment. rvagg: landing this from #1979 even though it wasn't from the original author. Treating approval there as approval of this commit too. PR-URL: #1979 Reviewed-By: Rod Vagg <rod@vagg.org>
1 parent fd4b135 commit 32c8744

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

.travis.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
dist: xenial
22
language: python
33
cache: pip
4-
matrix:
4+
addons:
5+
homebrew:
6+
update: true
7+
packages:
8+
- npm
9+
- pyenv
10+
jobs:
511
include:
612
- name: "Python 2.7 on Linux"
713
env: NODE_GYP_FORCE_PYTHON=python2
@@ -11,7 +17,9 @@ matrix:
1117
osx_image: xcode11.2
1218
language: shell # 'language: python' is not yet supported on macOS
1319
env: NODE_GYP_FORCE_PYTHON=python2
14-
before_install: HOMEBREW_NO_AUTO_UPDATE=1 brew install npm
20+
before_install:
21+
- pyenv install 2.7
22+
- pyenv global 2.7
1523
- name: "Node.js 6 & Python 2.7 on Windows"
1624
os: windows
1725
language: node_js
@@ -63,7 +71,6 @@ matrix:
6371
osx_image: xcode11.2
6472
language: shell # 'language: python' is not yet supported on macOS
6573
env: NODE_GYP_FORCE_PYTHON=python3
66-
before_install: HOMEBREW_NO_AUTO_UPDATE=1 brew upgrade npm || true
6774
- name: "Node.js 12 & Python 3.7 on Windows"
6875
os: windows
6976
language: node_js

0 commit comments

Comments
 (0)