File tree 3 files changed +68
-1
lines changed
3 files changed +68
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : CI
2
+
3
+ on : [push, pull_request]
4
+
5
+ jobs :
6
+ build :
7
+ strategy :
8
+ matrix :
9
+ node-version : [10.x, 12.x, 14.x]
10
+ platform :
11
+ - os : ubuntu-latest
12
+ shell : bash
13
+ - os : macos-latest
14
+ shell : bash
15
+ - os : windows-latest
16
+ shell : powershell
17
+
18
+ fail-fast : false
19
+
20
+ runs-on : ${{ matrix.platform.os }}
21
+ defaults :
22
+ run :
23
+ shell : ${{ matrix.platform.shell }}
24
+
25
+ steps :
26
+ # there are files here that make windows unhappy by default
27
+ - name : Support longpaths
28
+ run : git config --global core.longpaths true
29
+
30
+ - name : Checkout Repository
31
+
32
+
33
+ - name : Use Nodejs ${{ matrix.node-version }}
34
+ uses : actions/setup-node@v1
35
+ with :
36
+ node-version : ${{ matrix.node-version }}
37
+
38
+ - name : use latest npm
39
+ run : npm i -g npm@latest
40
+
41
+ - name : Install dependencies
42
+ run : npm install
43
+
44
+ - name : Run Tap Tests
45
+ run : npm test -- -c -t0
Original file line number Diff line number Diff line change 11
11
"url" : " https://github.com/npm/node-tar.git"
12
12
},
13
13
"scripts" : {
14
- "test" : " tap" ,
14
+ "test:posix" : " tap" ,
15
+ "test:win32" : " tap --lines=98 --branches=98 --statements=98 --functions=98" ,
16
+ "test" : " node test/fixtures/test.js" ,
15
17
"preversion" : " npm test" ,
16
18
"postversion" : " npm publish" ,
17
19
"postpublish" : " git push origin --follow-tags" ,
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