44 pull_request :
55 paths :
66 - %%pkgpath%%/**
7- branches :
8- - ' *'
97 push :
108 paths :
119 - %%pkgpath%%/**
@@ -20,55 +18,49 @@ jobs:
2018 steps :
2119 # Checkout the npm/cli repo
2220 - uses : actions/checkout@v2
23- - name : Use Node.js 16.x
24- uses : actions/setup-node@v2
21+ - uses : actions/setup-node@v2
2522 with :
26- node-version : 16.x
27- cache : npm
28- - name : Install dependencies
29- run : |
30- node ./bin/npm-cli.js install --ignore-scripts --no-audit
31- node ./bin/npm-cli.js rebuild
32- - name : Run linting
33- run : node ./bin/npm-cli.js run posttest -w %%pkgpath%%
34- env :
35- DEPLOY_VERSION : testing
23+ node-version : ' 16'
24+ - run : npm i --prefer-online -g npm@latest
25+ - run : npm i
26+ - run : npm run lint -w %%pkgpath%%
3627
3728 test :
3829 strategy :
3930 fail-fast : false
4031 matrix :
41- node-version : [' 12.13.0' , 12.x, ' 14.15.0' , 14.x, ' 16.0.0' , 16.x]
32+ node-version : [12.13.0, 12.x, 14.15.0, 14.x, 16.13.0 , 16.x]
4233 platform :
4334 - os : ubuntu-latest
4435 shell : bash
4536 - os : macos-latest
4637 shell : bash
4738 - os : windows-latest
4839 shell : cmd
49-
5040 runs-on : ${{ matrix.platform.os }}
5141 defaults :
5242 run :
5343 shell : ${{ matrix.platform.shell }}
54-
5544 steps :
56- # Checkout the npm/cli repo
57- - uses : actions/checkout@v2
58-
59- # Installs the specific version of Node.js
60- - name : Use Node.js ${{ matrix.node-version }}
61- uses : actions/setup-node@v2
62- with :
63- node-version : ${{ matrix.node-version }}
64- cache : npm
65-
66- # Run the installer script
67- - name : Install dependencies
68- run : |
69- node ./bin/npm-cli.js install --ignore-scripts --no-audit
70- node ./bin/npm-cli.js rebuild
71-
72- # Run the tests, but not if we're just gonna do coveralls later anyway
73- - name : Run Tap tests
74- run : node ./bin/npm-cli.js run -w %%pkgpath%% --ignore-scripts test -- -t600 -Rbase -c
45+ - uses : actions/checkout@v2
46+ - uses : actions/setup-node@v2
47+ with :
48+ node-version : ${{ matrix.node-version }}
49+ # node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
50+ - name : Update to workable npm (windows)
51+ if : matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12') || startsWith(matrix.node-version, '14'))
52+ run : |
53+ curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz
54+ tar xf npm-7.5.4.tgz
55+ cd package
56+ dir
57+ node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
58+ cd ..
59+ rmdir /s /q package
60+ - name : Update npm
61+ run : |
62+ npm -v
63+ npm i --prefer-online --no-fund --no-audit -g npm@latest
64+ npm -v
65+ - run : npm i
66+ - run : npm test --ignore-scripts -w %%pkgpath%%
0 commit comments