Skip to content

Commit 220edcd

Browse files
committed
AppVeyor: Test on a supported version of Python
Python 3.9 is the oldest version of Python that is supported. * https://devguide.python.org/versions
1 parent b5d90f1 commit 220edcd

File tree

1 file changed

+69
-28
lines changed

1 file changed

+69
-28
lines changed

appveyor.yml

+69-28
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,95 @@
11
# http://www.appveyor.com/docs/appveyor-yml
2+
# https://www.appveyor.com/docs/windows-images-software
3+
# https://nodejs.org/en/about/previous-releases
4+
# https://devguide.python.org/versions
5+
6+
# Test supported Node.js versions before unsupported versions.
7+
# Run on the most current Visual Studio possible for each nodejs_version.
8+
# Run on the earliest supported Python version when possible (currently py39).
9+
# For all supported Node.js versions test also on the latest Python (currently py313).
210

311
image:
4-
- Visual Studio 2017
12+
- Visual Studio 2022
513

6-
# Test against these versions of Io.js and Node.js.
714
environment:
8-
matrix:
9-
# node.js
10-
- nodejs_version: "0.10"
11-
- nodejs_version: "0.12"
12-
- nodejs_version: "4"
13-
- nodejs_version: "5"
14-
- nodejs_version: "6"
15-
- nodejs_version: "7"
16-
- nodejs_version: "8"
17-
- nodejs_version: "9"
18-
- nodejs_version: "10"
19-
- nodejs_version: "11"
20-
- nodejs_version: "12"
21-
- nodejs_version: "13"
22-
- nodejs_version: "14"
23-
- nodejs_version: "15"
24-
- nodejs_version: "16"
25-
- nodejs_version: "17"
26-
- nodejs_version: "18"
27-
- nodejs_version: "19"
28-
- nodejs_version: "20"
15+
NODE_GYP_FORCE_PYTHON: C:\Python39-x64\python.exe
16+
matrix: # Test against these versions of Io.js and Node.js.
17+
# - nodejs_version: "23" # Enable after nodejs/nan#979 or similar.
18+
- nodejs_version: "22"
19+
- nodejs_version: "22"
20+
NODE_GYP_FORCE_PYTHON: C:\Python310-x64\python.exe
21+
- nodejs_version: "22"
22+
NODE_GYP_FORCE_PYTHON: C:\Python311-x64\python.exe
23+
# node-gyp >= v3.10 is required for Python >= 3.12
24+
#- nodejs_version: "22" # These fail because of nodejs/node-gyp#2869
25+
# NODE_GYP_FORCE_PYTHON: C:\Python312-x64\python.exe
26+
#- nodejs_version: "22"
27+
# NODE_GYP_FORCE_PYTHON: C:\Python313-x64\python.exe
2928
- nodejs_version: "21"
30-
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
31-
nodejs_version: "22"
32-
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
33-
nodejs_version: "23"
29+
- nodejs_version: "20"
30+
#- nodejs_version: "20"
31+
# NODE_GYP_FORCE_PYTHON: C:\Python313-x64\python.exe
32+
- nodejs_version: "19"
33+
- nodejs_version: "18"
34+
#- nodejs_version: "18"
35+
# NODE_GYP_FORCE_PYTHON: C:\Python313-x64\python.exe
36+
- nodejs_version: "17"
37+
- nodejs_version: "16"
38+
- nodejs_version: "15"
39+
- nodejs_version: "14"
40+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
41+
- nodejs_version: "13"
42+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
43+
- nodejs_version: "12"
44+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
45+
- nodejs_version: "11"
46+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
47+
- nodejs_version: "10"
48+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
49+
- nodejs_version: "9"
50+
- nodejs_version: "8"
51+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
52+
- nodejs_version: "7"
53+
- nodejs_version: "6"
54+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
55+
- nodejs_version: "5"
56+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
57+
- nodejs_version: "4"
58+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
59+
- nodejs_version: "0.12"
60+
- nodejs_version: "0.10"
61+
62+
matrix:
63+
fast_finish: true
3464

3565
# Install scripts. (runs after repo cloning)
3666
install:
67+
# Output useful info for debugging.
68+
- node --version
69+
- npm --version
70+
- py --list
71+
- py -VV # py is 64-bit AMD64 Python 3 on Visual Studio images
72+
- python -VV # python is 32-bit Intel Python 3 on Visual Studio images
3773
# Get the latest stable version of Node 0.STABLE.latest
3874
- ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) x64
75+
- node --version
3976
- IF %nodejs_version% LSS 4 npm -g install npm@2
4077
- IF %nodejs_version% EQU 5 npm -g install npm@3
4178
- set PATH=%APPDATA%\npm;%PATH%
4279
# Typical npm stuff.
4380
- npm install
44-
- IF %nodejs_version% GEQ 22 set NODE_GYP_FORCE_PYTHON=C:\Python38-x64\python.exe
4581
- IF %nodejs_version% LSS 8 (npm run rebuild-tests-2015) ELSE (npm run rebuild-tests)
82+
# If Python >= v3.12 then node-gyp < v10 will need setuptools installed.
83+
- IF "%NODE_GYP_FORCE_PYTHON%" NEQ "C:\Python39-x64\python.exe" (py -m pip install setuptools)
4684

4785
# Post-install test scripts.
4886
test_script:
4987
# Output useful info for debugging.
5088
- node --version
5189
- npm --version
90+
- py --list
91+
- py -VV # py is 64-bit AMD64 Python 3 on Visual Studio images
92+
- python -VV # python is 32-bit Intel Python 3 on Visual Studio images
5293
# run tests
5394
- IF %nodejs_version% LSS 1 (npm test) ELSE (IF %nodejs_version% LSS 4 (iojs node_modules\tap\bin\tap.js --gc test/js/*-test.js) ELSE (node node_modules\tap\bin\tap.js --gc test/js/*-test.js))
5495

0 commit comments

Comments
 (0)