@@ -10,88 +10,117 @@ permissions:
10
10
contents : read
11
11
12
12
jobs :
13
- audit :
13
+ # #################
14
+ # Jobs with matrix
15
+ # #################
16
+ unit :
14
17
runs-on : ubuntu-latest
18
+ strategy :
19
+ fail-fast : false
20
+ matrix :
21
+ node-version : [14, 'lts/*']
22
+ # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
15
23
steps :
16
24
- uses : actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2
17
- - uses : actions/setup-node@f1f314fca9dfce2769ece7d933488f076716723e # v1
25
+ - name : Use Node.js ${{ matrix.node-version }}
26
+ uses : actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3
18
27
with :
19
- node-version : 12
28
+ node-version : ${{ matrix.node-version }}
20
29
registry-url : https://registry.npmjs.org/
30
+ cache : ' npm'
21
31
- run : npm ci
22
- - run : npm run audit
23
- unit :
32
+ - run : npm run unit
33
+ integration :
24
34
runs-on : ubuntu-latest
35
+ strategy :
36
+ fail-fast : false
37
+ matrix :
38
+ node-version : [14, 'lts/*']
39
+ # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
40
+ services :
41
+ regtest :
42
+ image : junderw/bitcoinjs-regtest-server@sha256:5b69cf95d9edf6d5b3a00504665d6b3c382a6aa3728fe8ce897974c519061463
43
+ ports :
44
+ - 8080:8080
25
45
steps :
26
46
- uses : actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2
27
- - uses : actions/setup-node@f1f314fca9dfce2769ece7d933488f076716723e # v1
47
+ - name : Use Node.js ${{ matrix.node-version }}
48
+ uses : actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3
28
49
with :
29
- node-version : 12
50
+ node-version : ${{ matrix.node-version }}
30
51
registry-url : https://registry.npmjs.org/
52
+ cache : ' npm'
31
53
- run : npm ci
32
- - run : npm run unit
33
- coverage :
54
+ - run : APIURL=http://127.0.0.1:8080/1 npm run integration
55
+
56
+
57
+
58
+ # ####################
59
+ # Jobs without matrix
60
+ # ####################
61
+ audit :
34
62
runs-on : ubuntu-latest
35
63
steps :
36
64
- uses : actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2
37
- - uses : actions/setup-node@f1f314fca9dfce2769ece7d933488f076716723e # v1
65
+ - uses : actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3
38
66
with :
39
- node-version : 12
67
+ node-version : ' lts/* '
40
68
registry-url : https://registry.npmjs.org/
69
+ cache : ' npm'
41
70
- run : npm ci
42
- - run : npm run coverage
43
- integration :
71
+ - run : npm run audit
72
+ coverage :
44
73
runs-on : ubuntu-latest
45
- services :
46
- regtest :
47
- image : junderw/bitcoinjs-regtest-server@sha256:5b69cf95d9edf6d5b3a00504665d6b3c382a6aa3728fe8ce897974c519061463
48
- ports :
49
- - 8080:8080
50
74
steps :
51
75
- uses : actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2
52
- - uses : actions/setup-node@f1f314fca9dfce2769ece7d933488f076716723e # v1
76
+ - uses : actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3
53
77
with :
54
- node-version : 12
78
+ node-version : ' lts/* '
55
79
registry-url : https://registry.npmjs.org/
80
+ cache : ' npm'
56
81
- run : npm ci
57
- - run : APIURL=http://127.0.0.1:8080/1 npm run integration
82
+ - run : npm run coverage
58
83
format :
59
84
runs-on : ubuntu-latest
60
85
steps :
61
86
- uses : actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2
62
- - uses : actions/setup-node@f1f314fca9dfce2769ece7d933488f076716723e # v1
87
+ - uses : actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3
63
88
with :
64
- node-version : 12
89
+ node-version : ' lts/* '
65
90
registry-url : https://registry.npmjs.org/
91
+ cache : ' npm'
66
92
- run : npm ci
67
93
- run : npm run format:ci
68
94
gitdiff :
69
95
runs-on : ubuntu-latest
70
96
steps :
71
97
- uses : actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2
72
- - uses : actions/setup-node@f1f314fca9dfce2769ece7d933488f076716723e # v1
98
+ - uses : actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3
73
99
with :
74
- node-version : 12
100
+ node-version : ' lts/* '
75
101
registry-url : https://registry.npmjs.org/
102
+ cache : ' npm'
76
103
- run : npm ci
77
104
- run : npm run gitdiff:ci
78
105
lint :
79
106
runs-on : ubuntu-latest
80
107
steps :
81
108
- uses : actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2
82
- - uses : actions/setup-node@f1f314fca9dfce2769ece7d933488f076716723e # v1
109
+ - uses : actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3
83
110
with :
84
- node-version : 12
111
+ node-version : ' lts/* '
85
112
registry-url : https://registry.npmjs.org/
113
+ cache : ' npm'
86
114
- run : npm ci
87
115
- run : npm run lint
88
116
lint-tests :
89
117
runs-on : ubuntu-latest
90
118
steps :
91
119
- uses : actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2
92
- - uses : actions/setup-node@f1f314fca9dfce2769ece7d933488f076716723e # v1
120
+ - uses : actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3
93
121
with :
94
- node-version : 12
122
+ node-version : ' lts/* '
95
123
registry-url : https://registry.npmjs.org/
124
+ cache : ' npm'
96
125
- run : npm ci
97
126
- run : npm run lint:tests
0 commit comments