UNPKG

3.82 kBYAMLView Raw
1dist: xenial
2language: python
3cache: pip
4addons:
5 homebrew:
6 update: true
7 packages:
8 - npm
9 - pyenv
10jobs:
11 include:
12 - name: "Python 2.7 on Linux"
13 env: NODE_GYP_FORCE_PYTHON=python2
14 python: 2.7
15
16 - name: "Node.js 6 & Python 3.8 on Linux"
17 python: 3.8
18 env: NODE_GYP_FORCE_PYTHON=python3
19 before_install: nvm install 6
20 - name: "Node.js 8 & Python 3.8 on Linux"
21 python: 3.8
22 env: NODE_GYP_FORCE_PYTHON=python3
23 before_install: nvm install 8
24 - name: "Node.js 10 & Python 3.8 on Linux"
25 python: 3.8
26 env: NODE_GYP_FORCE_PYTHON=python3
27 before_install: nvm install 10
28
29 - name: "Node.js 12 & Python 3.5 on Linux"
30 python: 3.5
31 env: NODE_GYP_FORCE_PYTHON=python3
32 before_install: nvm install 12
33 - name: "Node.js 12 & Python 3.6 on Linux"
34 python: 3.6
35 env: NODE_GYP_FORCE_PYTHON=python3
36 before_install: nvm install 12
37 - name: "Node.js 12 & Python 3.7 on Linux"
38 python: 3.7
39 env: NODE_GYP_FORCE_PYTHON=python3
40 before_install: nvm install 12
41 - name: "Node.js 12 & Python 3.8 on Linux"
42 python: 3.8
43 env: NODE_GYP_FORCE_PYTHON=python3
44 before_install: nvm install 12
45
46 - name: "Python 2.7 on macOS"
47 os: osx
48 osx_image: xcode11.2
49 language: shell # 'language: python' is not yet supported on macOS
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
76 - name: "Node.js 12 & Python 3.7 on Windows"
77 os: windows
78 language: node_js
79 node_js: 12 # node
80 env: >-
81 PATH=/c/Python37:/c/Python37/Scripts:$PATH
82 NODE_GYP_FORCE_PYTHON=/c/Python37/python.exe
83 before_install: choco install python --version=3.7.4
84 - name: "Node.js 12 & Python 3.8 on Windows"
85 os: windows
86 language: node_js
87 node_js: 12 # node
88 env: >-
89 PATH=/c/Python38:/c/Python38/Scripts:$PATH
90 NODE_GYP_FORCE_PYTHON=/c/Python38/python.exe
91 before_install: choco install python
92
93install:
94 - python -m pip install --upgrade flake8 pytest==4.6.6 # pytest 5 no longer supports legacy Python
95before_script:
96 - python -m flake8 --version
97 # stop the build if there are Python syntax errors or undefined names
98 - python -m flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
99 # exit-zero treats all errors as warnings. Two space indentation is OK. The GitHub editor is 127 chars wide
100 - python -m flake8 . --count --exit-zero --ignore=E111,E114,W503 --max-complexity=10 --max-line-length=127 --statistics
101 - npm install
102 - npm list
103script:
104 - node -e 'require("npmlog").level="verbose"; require("./lib/find-python")(null,()=>{})'
105 - npm test
106 - GYP_MSVS_VERSION=2015 GYP_MSVS_OVERRIDE_PATH="C:\\Dummy" python -m pytest
107notifications:
108 on_success: change
109 on_failure: change # `always` will be the setting once code changes slow down