Skip to content

Commit 8683166

Browse files
committed
[Tests] add node 15 to appveyor, fix "latest npm" logic
1 parent d58fd30 commit 8683166

File tree

1 file changed

+31
-11
lines changed

1 file changed

+31
-11
lines changed

appveyor.yml

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ build: off
44

55
environment:
66
matrix:
7+
- nodejs_version: "15"
8+
- nodejs_version: "14"
9+
- nodejs_version: "13"
710
- nodejs_version: "12"
811
- nodejs_version: "11"
912
- nodejs_version: "10"
@@ -25,6 +28,7 @@ matrix:
2528
allow_failures:
2629
- nodejs_version: "5" # due to windows npm bug, registry-side
2730
- nodejs_version: "0.8"
31+
# platform: x86 # x64 has started failing on the registry side, around early November 2020
2832
- nodejs_version: "0.6"
2933

3034
platform:
@@ -33,17 +37,33 @@ platform:
3337

3438
# Install scripts. (runs after repo cloning)
3539
install:
36-
# Fix symlinks in working copy (see https://github.com/appveyor/ci/issues/650#issuecomment-186592582) / https://github.com/charleskorn/batect/commit/d08986802ec43086902958c4ee7e57ff3e71dbef
37-
- git config core.symlinks true
38-
- git reset --hard
39-
# Get the latest stable version of Node.js or io.js
40-
- ps: Install-Product node $env:nodejs_version $env:platform
41-
- IF %nodejs_version% EQU 0.6 npm config set strict-ssl false && npm -g install npm@1.3
42-
- IF %nodejs_version% EQU 0.8 npm config set strict-ssl false && npm -g install npm@1.4.28 && npm install -g npm@4.5
43-
- set PATH=%APPDATA%\npm;%PATH%
44-
#- IF %nodejs_version% NEQ 0.6 AND %nodejs_version% NEQ 0.8 npm -g install npm
45-
# install modules
46-
- npm install
40+
# Fix symlinks in working copy (see https://github.com/appveyor/ci/issues/650#issuecomment-186592582) / https://github.com/charleskorn/batect/commit/d08986802ec43086902958c4ee7e57ff3e71dbef
41+
- git config core.symlinks true
42+
- git reset --hard
43+
# Get the latest stable version of Node.js or io.js
44+
- ps: if ($env:nodejs_version -ne '0.6') { Install-Product node $env:nodejs_version $env:platform }
45+
- ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) $env:platform
46+
- IF %nodejs_version% EQU 0.6 npm config set strict-ssl false && npm -g install npm@1.3
47+
- IF %nodejs_version% EQU 0.8 npm config set strict-ssl false && npm -g install npm@1.4.28 && npm install -g npm@4.5
48+
- IF %nodejs_version% EQU 1 npm -g install npm@2.9
49+
- IF %nodejs_version% EQU 2 npm -g install npm@4
50+
- IF %nodejs_version% EQU 3 npm -g install npm@4
51+
- IF %nodejs_version% EQU 4 npm -g install npm@5.3
52+
- IF %nodejs_version% EQU 5 npm -g install npm@5.3
53+
- IF %nodejs_version% EQU 6 npm -g install npm@6.9
54+
- IF %nodejs_version% EQU 7 npm -g install npm@6
55+
- IF %nodejs_version% EQU 8 npm -g install npm@6
56+
- IF %nodejs_version% EQU 9 npm -g install npm@6.9
57+
- IF %nodejs_version% EQU 10 npm -g install npm@7
58+
- IF %nodejs_version% EQU 11 npm -g install npm@7
59+
- IF %nodejs_version% EQU 12 npm -g install npm@7
60+
- IF %nodejs_version% EQU 13 npm -g install npm@7
61+
- IF %nodejs_version% EQU 14 npm -g install npm@7
62+
- IF %nodejs_version% EQU 15 npm -g install npm@7
63+
- set PATH=%APPDATA%\npm;%PATH%
64+
#- IF %nodejs_version% NEQ 0.6 AND %nodejs_version% NEQ 0.8 npm -g install npm
65+
# install modules
66+
- npm install
4767

4868
# Post-install test scripts.
4969
test_script:

0 commit comments

Comments
 (0)