File tree Expand file tree Collapse file tree 3 files changed +28
-10
lines changed Expand file tree Collapse file tree 3 files changed +28
-10
lines changed Original file line number Diff line number Diff line change 1212 shell : bash
1313 - os : macos-latest
1414 shell : bash
15-
16- # TODO: make tests pass on windows. it works, but the tests have
17- # quite a lot of unixisms wrt modes and paths. mostly trivial
18- # stuff to fix, but a lot of it.
19- #
20- # - os: windows-latest
21- # shell: bash
22- # - os: windows-latest
23- # shell: powershell
15+ - os : windows-latest
16+ shell : powershell
2417
2518 fail-fast : false
2619
4235 with :
4336 node-version : ${{ matrix.node-version }}
4437
38+ - name : use latest npm
39+ run : npm i -g npm@latest
40+
4541 - name : Install dependencies
4642 run : npm install
4743
Original file line number Diff line number Diff line change 88 "url" : " https://github.com/npm/node-tar.git"
99 },
1010 "scripts" : {
11- "test" : " tap" ,
11+ "test:posix" : " tap" ,
12+ "test:win32" : " tap --lines=98 --branches=98 --statements=98 --functions=98" ,
13+ "test" : " node test/fixtures/test.js" ,
1214 "posttest" : " npm run lint" ,
1315 "eslint" : " eslint" ,
1416 "lint" : " npm run eslint -- test lib" ,
Original file line number Diff line number Diff line change 1+ const platform = process . platform === 'win32' ? 'win32' : 'posix'
2+ const { spawn} = require ( 'child_process' )
3+ const c = spawn ( process . execPath , [
4+ process . env . npm_execpath ,
5+ 'run' ,
6+ `test:${ platform } ` ,
7+ '--' ,
8+ ...process . argv . slice ( 2 ) ,
9+ ] , {
10+ stdio : 'inherit' ,
11+ } )
12+ c . on ( 'close' , ( code , signal ) => {
13+ process . exitCode = code
14+ if ( signal ) {
15+ process . kill ( process . pid , signal )
16+ setTimeout ( ( ) => { } , 200 )
17+ }
18+ } )
19+ process . on ( 'SIGTERM' , ( ) => c . kill ( 'SIGTERM' ) )
20+ process . on ( 'SIGINT' , ( ) => c . kill ( 'SIGINT' ) )
You can’t perform that action at this time.
0 commit comments