|
12 | 12 | - name: "Python 2.7 on Linux" |
13 | 13 | env: NODE_GYP_FORCE_PYTHON=python2 |
14 | 14 | python: 2.7 |
15 | | - - name: "Python 2.7 on macOS" |
16 | | - os: osx |
17 | | - osx_image: xcode11.2 |
18 | | - language: shell # 'language: python' is not yet supported on macOS |
19 | | - env: NODE_GYP_FORCE_PYTHON=python2 |
20 | | - before_install: |
21 | | - - pyenv install 2.7 |
22 | | - - pyenv global 2.7 |
23 | | - - name: "Node.js 6 & Python 2.7 on Windows" |
24 | | - os: windows |
25 | | - language: node_js |
26 | | - node_js: 6 # node |
27 | | - env: >- |
28 | | - PATH=/c/Python27:/c/Python27/Scripts:$PATH |
29 | | - NODE_GYP_FORCE_PYTHON=/c/Python27/python.exe |
30 | | - before_install: choco install python2 |
31 | | - - name: "Node.js 12 & Python 2.7 on Windows" |
32 | | - os: windows |
33 | | - language: node_js |
34 | | - node_js: 12 # node |
35 | | - env: >- |
36 | | - PATH=/c/Python27:/c/Python27/Scripts:$PATH |
37 | | - NODE_GYP_FORCE_PYTHON=/c/Python27/python.exe |
38 | | - before_install: choco install python2 |
39 | 15 |
|
40 | 16 | - name: "Node.js 6 & Python 3.8 on Linux" |
41 | 17 | python: 3.8 |
@@ -67,11 +43,36 @@ jobs: |
67 | 43 | env: NODE_GYP_FORCE_PYTHON=python3 |
68 | 44 | before_install: nvm install 12 |
69 | 45 |
|
70 | | - - name: "Python 3.7 on macOS" |
| 46 | + - name: "Python 2.7 on macOS" |
71 | 47 | os: osx |
72 | 48 | osx_image: xcode11.2 |
73 | 49 | language: shell # 'language: python' is not yet supported on macOS |
74 | | - env: NODE_GYP_FORCE_PYTHON=python3 |
| 50 | + env: NODE_GYP_FORCE_PYTHON=python2 PATH=$HOME/.pyenv/shims:$PATH PYENV_VERSION=2.7.17 |
| 51 | + before_install: pyenv install $PYENV_VERSION |
| 52 | + - name: "Python 3.8 on macOS" |
| 53 | + os: osx |
| 54 | + osx_image: xcode11.2 |
| 55 | + language: shell # 'language: python' is not yet supported on macOS |
| 56 | + env: NODE_GYP_FORCE_PYTHON=python3 PATH=$HOME/.pyenv/shims:$PATH PYENV_VERSION=3.8.0 |
| 57 | + before_install: pyenv install $PYENV_VERSION |
| 58 | + |
| 59 | + - name: "Node.js 6 & Python 2.7 on Windows" |
| 60 | + os: windows |
| 61 | + language: node_js |
| 62 | + node_js: 6 # node |
| 63 | + env: >- |
| 64 | + PATH=/c/Python27:/c/Python27/Scripts:$PATH |
| 65 | + NODE_GYP_FORCE_PYTHON=/c/Python27/python.exe |
| 66 | + before_install: choco install python2 |
| 67 | + - name: "Node.js 12 & Python 2.7 on Windows" |
| 68 | + os: windows |
| 69 | + language: node_js |
| 70 | + node_js: 12 # node |
| 71 | + env: >- |
| 72 | + PATH=/c/Python27:/c/Python27/Scripts:$PATH |
| 73 | + NODE_GYP_FORCE_PYTHON=/c/Python27/python.exe |
| 74 | + before_install: choco install python2 |
| 75 | + |
75 | 76 | - name: "Node.js 12 & Python 3.7 on Windows" |
76 | 77 | os: windows |
77 | 78 | language: node_js |
@@ -90,20 +91,19 @@ jobs: |
90 | 91 | before_install: choco install python |
91 | 92 |
|
92 | 93 | install: |
93 | | - #- pip install -r requirements.txt |
94 | | - - pip install --upgrade flake8 pytest==4.6.6 # pytest 5 no longer supports legacy Python |
| 94 | + - python -m pip install --upgrade flake8 pytest==4.6.6 # pytest 5 no longer supports legacy Python |
95 | 95 | before_script: |
96 | | - - flake8 --version |
| 96 | + - python -m flake8 --version |
97 | 97 | # stop the build if there are Python syntax errors or undefined names |
98 | | - - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics |
| 98 | + - python -m flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics |
99 | 99 | # exit-zero treats all errors as warnings. Two space indentation is OK. The GitHub editor is 127 chars wide |
100 | | - - flake8 . --count --exit-zero --ignore=E111,E114,W503 --max-complexity=10 --max-line-length=127 --statistics |
| 100 | + - python -m flake8 . --count --exit-zero --ignore=E111,E114,W503 --max-complexity=10 --max-line-length=127 --statistics |
101 | 101 | - npm install |
102 | 102 | - npm list |
103 | 103 | script: |
104 | 104 | - node -e 'require("npmlog").level="verbose"; require("./lib/find-python")(null,()=>{})' |
105 | 105 | - npm test |
106 | | - - GYP_MSVS_VERSION=2015 GYP_MSVS_OVERRIDE_PATH="C:\\Dummy" pytest |
| 106 | + - GYP_MSVS_VERSION=2015 GYP_MSVS_OVERRIDE_PATH="C:\\Dummy" python -m pytest |
107 | 107 | notifications: |
108 | 108 | on_success: change |
109 | 109 | on_failure: change # `always` will be the setting once code changes slow down |