File tree Expand file tree Collapse file tree 4 files changed +61
-14
lines changed
test-80-compression-node-opcua Expand file tree Collapse file tree 4 files changed +61
-14
lines changed Original file line number Diff line number Diff line change 7
7
pull_request :
8
8
9
9
jobs :
10
- test :
10
+ build :
11
11
strategy :
12
12
fail-fast : false # prevent test to stop if one fails
13
13
matrix :
14
14
node-version : [18.x, 20.x]
15
15
os : [ubuntu-latest, windows-latest, macos-latest]
16
16
runs-on : ${{ matrix.os }}
17
17
steps :
18
- - uses : actions/checkout@v3
19
- - uses : actions/setup-node@v3
18
+ - uses : actions/checkout@v4
19
+ - uses : actions/setup-node@v4
20
20
with :
21
21
node-version : ${{ matrix.node-version }}
22
- - uses : actions/cache@v3
23
- with :
24
- path : ~/.pkg-cache/
25
- key : ${{ matrix.os }}-${{ matrix.node-version }}
22
+ cache : ' yarn'
26
23
27
24
- run : yarn install
28
25
29
26
- if : matrix['node-version'] == '18.x' && matrix['os'] == 'ubuntu-latest'
30
27
run : yarn lint
31
28
- run : yarn build
32
- - run : yarn test
33
- env :
34
- CI : true
35
- timeout-minutes : 30
29
+ test_host :
30
+ uses : ./.github/workflows/test.yml
31
+ with :
32
+ npm_command : test:host
33
+
34
+ test_18 :
35
+ uses : ./.github/workflows/test.yml
36
+ with :
37
+ npm_command : test:18
38
+
39
+ test_20 :
40
+ uses : ./.github/workflows/test.yml
41
+ with :
42
+ npm_command : test:20
Original file line number Diff line number Diff line change
1
+ name : CI
2
+
3
+ on :
4
+ workflow_call :
5
+ inputs :
6
+ npm_command :
7
+ description : ' NPM command to run'
8
+ type : string
9
+ required : true
10
+ default : ' install'
11
+ jobs :
12
+ test :
13
+ strategy :
14
+ fail-fast : false # prevent test to stop if one fails
15
+ matrix :
16
+ node-version : [18.x, 20.x]
17
+ os : [ubuntu-latest, windows-latest, macos-latest]
18
+ runs-on : ${{ matrix.os }}
19
+ steps :
20
+ - uses : actions/checkout@v4
21
+ - uses : actions/setup-node@v4
22
+ with :
23
+ node-version : ${{ matrix.node-version }}
24
+ cache : ' yarn'
25
+ - uses : actions/cache@v4
26
+ with :
27
+ path : ~/.pkg-cache/
28
+ key : ${{ matrix.os }}-${{ matrix.node-version }}
29
+
30
+ - run : yarn install
31
+
32
+ - run : yarn build
33
+ - run : yarn ${{ inputs.npm_command }}
34
+ env :
35
+ CI : true
36
+ timeout-minutes : 30
Original file line number Diff line number Diff line change @@ -14,6 +14,12 @@ const assert = require('assert');
14
14
const utils = require ( '../utils.js' ) ;
15
15
const pkgJson = require ( './package.json' ) ;
16
16
17
+ // FIXME: this test takes a long time to run (from 5min on linux up to 10 minuntes on windows)
18
+ // run only on linux to save time on CI
19
+ if ( process . platform !== 'linux' ) {
20
+ return ;
21
+ }
22
+
17
23
const isWindows = process . platform === 'win32' ;
18
24
const buildDir = 'build' ;
19
25
Original file line number Diff line number Diff line change @@ -189,7 +189,6 @@ async function run() {
189
189
} catch ( error ) {
190
190
failed . push ( {
191
191
file,
192
- error : error . message ,
193
192
output : error . logOutput ,
194
193
} ) ;
195
194
addLog (
@@ -219,10 +218,9 @@ async function run() {
219
218
console . log ( `Ok: ${ ok } ` ) ;
220
219
console . log ( `Failed: ${ failed . length } ` ) ;
221
220
// print failed tests
222
- for ( const { file, error , output } of failed ) {
221
+ for ( const { file, output } of failed ) {
223
222
console . log ( '' ) ;
224
223
console . log ( `--- ${ file } ---` ) ;
225
- console . log ( pc . red ( error ) ) ;
226
224
console . log ( pc . red ( output ) ) ;
227
225
}
228
226
console . log ( `Time: ${ msToHumanDuration ( end - start ) } ` ) ;
You can’t perform that action at this time.
0 commit comments