File tree 3 files changed +28
-10
lines changed
3 files changed +28
-10
lines changed Original file line number Diff line number Diff line change 12
12
shell : bash
13
13
- os : macos-latest
14
14
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
24
17
25
18
fail-fast : false
26
19
42
35
with :
43
36
node-version : ${{ matrix.node-version }}
44
37
38
+ - name : use latest npm
39
+ run : npm i -g npm@latest
40
+
45
41
- name : Install dependencies
46
42
run : npm install
47
43
Original file line number Diff line number Diff line change 8
8
"url" : " https://github.com/npm/node-tar.git"
9
9
},
10
10
"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" ,
12
14
"posttest" : " npm run lint" ,
13
15
"eslint" : " eslint" ,
14
16
"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