@@ -14,44 +14,69 @@ jobs:
1414 build :
1515 strategy :
1616 matrix :
17- node : [14 , 16]
18- name : Build Packages
17+ node : [18 , 16]
18+ name : Build CJS
1919 runs-on : ubuntu-latest
2020 steps :
2121 - uses : actions/checkout@v3
2222 - uses : actions/setup-node@v3
2323 with :
2424 node-version : ${{ matrix.node }}
2525 cache : yarn
26- - run : yarn
26+ - run : yarn install --ignore-scripts
27+ - run : yarn prebuild
28+ - run : yarn build:cjs
2729 - run : tar -czf /tmp/web3-${{ matrix.node }}.js.tar.gz --exclude="./.git" ./
2830 - uses : actions/upload-artifact@v3
2931 with :
3032 name : web3-${{ matrix.node }}.js.tar.gz
3133 path : /tmp/web3-${{ matrix.node }}.js.tar.gz
32-
34+ build-esm-types :
35+ name : Build ESM & Types
36+ needs : build
37+ runs-on : ubuntu-latest
38+ strategy :
39+ matrix :
40+ node : [ 18, 16 ]
41+ steps :
42+ - uses : actions/setup-node@v3
43+ with :
44+ node-version : ${{ matrix.node }}
45+ - uses : actions/download-artifact@v3
46+ with :
47+ name : web3-${{ matrix.node }}.js.tar.gz
48+ path : /tmp
49+ - run : tar -xf /tmp/web3-${{ matrix.node }}.js.tar.gz -C ./
50+ - run : yarn build:esm
51+ - run : yarn build:types
3352 lint :
34- name : lint
35- needs : build
36- runs-on : ubuntu-latest
37- steps :
38- - uses : actions/download-artifact@v3
39- with :
40- name : web3-14.js.tar.gz
41- path : /tmp
42- - run : tar -xf /tmp/web3-14.js.tar.gz -C ./
43- - run : yarn lint
53+ name : Lint
54+ needs : build
55+ runs-on : ubuntu-latest
56+ steps :
57+ - uses : actions/setup-node@v3
58+ with :
59+ node-version : 18
60+ - uses : actions/download-artifact@v3
61+ with :
62+ name : web3-18.js.tar.gz
63+ path : /tmp
64+ - run : tar -xf /tmp/web3-18.js.tar.gz -C ./
65+ - run : yarn lint
4466
4567 build-web :
4668 name : Build Web
4769 needs : build
4870 runs-on : ubuntu-latest
4971 steps :
72+ - uses : actions/setup-node@v3
73+ with :
74+ node-version : 18
5075 - uses : actions/download-artifact@v3
5176 with :
52- name : web3-16 .js.tar.gz
53- path : /tmp
54- - run : tar -xf /tmp/web3-16 .js.tar.gz -C ./
77+ name : web3-18 .js.tar.gz
78+ path : /tmp
79+ - run : tar -xf /tmp/web3-18 .js.tar.gz -C ./
5580 - name : Restore default branch stats
5681 if : github.event_name != 'push'
5782 uses : actions/cache/restore@v3
@@ -82,8 +107,11 @@ jobs:
82107 runs-on : ubuntu-latest
83108 strategy :
84109 matrix :
85- node : [14 , 16]
110+ node : [18 , 16]
86111 steps :
112+ - uses : actions/setup-node@v3
113+ with :
114+ node-version : ${{ matrix.node }}
87115 - uses : actions/download-artifact@v3
88116 with :
89117 name : web3-${{ matrix.node }}.js.tar.gz
95123 with :
96124 flags : UnitTests
97125 token : ${{ secrets.CODECOV_TOKEN }}
98- if : ${{ matrix.node == 16 }}
126+ if : ${{ matrix.node == 18 }}
99127
100128 integration :
101129 name : Integration
@@ -107,10 +135,13 @@ jobs:
107135 strategy :
108136 fail-fast : false
109137 matrix :
110- node : [14 , 16]
138+ node : [18 , 16]
111139 backend : ['geth', 'ganache']
112140 mode : ['http', 'ws']
113141 steps :
142+ - uses : actions/setup-node@v3
143+ with :
144+ node-version : ${{ matrix.node }}
114145 - uses : actions/download-artifact@v3
115146 with :
116147 name : web3-${{ matrix.node }}.js.tar.gz
@@ -129,10 +160,13 @@ jobs:
129160 strategy :
130161 fail-fast : false
131162 matrix :
132- node : [ 14 , 16 ]
163+ node : [ 18 , 16 ]
133164 backend : [ 'geth' ]
134165 mode : [ 'ipc' ]
135166 steps :
167+ - uses : actions/setup-node@v3
168+ with :
169+ node-version : ${{ matrix.node }}
136170 - uses : actions/download-artifact@v3
137171 with :
138172 name : web3-${{ matrix.node }}.js.tar.gz
@@ -148,10 +182,13 @@ jobs:
148182 strategy :
149183 fail-fast : false
150184 matrix :
151- node : [ 16 ]
185+ node : [ 18 ]
152186 backend : [ 'geth' ]
153187 mode : [ 'ws','ipc' ]
154188 steps :
189+ - uses : actions/setup-node@v3
190+ with :
191+ node-version : ${{ matrix.node }}
155192 - uses : actions/download-artifact@v3
156193 with :
157194 name : web3-${{ matrix.node }}.js.tar.gz
@@ -167,9 +204,12 @@ jobs:
167204 strategy :
168205 fail-fast : false
169206 matrix :
170- node : [14 , 16]
207+ node : [18 , 16]
171208 browser : ['electron', 'chrome', 'firefox']
172209 steps :
210+ - uses : actions/setup-node@v3
211+ with :
212+ node-version : ${{ matrix.node }}
173213 - uses : browser-actions/setup-firefox@latest
174214 if : matrix.browser == 'firefox'
175215 - uses : actions/download-artifact@v3
@@ -191,8 +231,11 @@ jobs:
191231 runs-on : ubuntu-latest
192232 strategy :
193233 matrix :
194- node : [ 16 ]
234+ node : [ 18 ]
195235 steps :
236+ - uses : actions/setup-node@v3
237+ with :
238+ node-version : ${{ matrix.node }}
196239 - uses : actions/download-artifact@v3
197240 with :
198241 name : web3-${{ matrix.node }}.js.tar.gz
0 commit comments