diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index dd1279159b7..b8c0f6647fd 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -14,7 +14,7 @@ jobs:
build:
strategy:
matrix:
- node: [18, 20]
+ node: ['18', '20.17.0']
name: Build CJS
runs-on: ubuntu-latest
steps:
@@ -23,7 +23,7 @@ jobs:
with:
node-version: ${{ matrix.node }}
cache: yarn
- - run: yarn install --ignore-scripts
+ - run: yarn install --ignore-scripts --frozen-lockfile
- run: npx ts-node scripts/init.ts
- run: yarn build:cjs
- uses: actions/cache/save@v4
@@ -165,7 +165,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- node: [18, 20]
+ node: ['18', '20.17.0']
steps:
- uses: actions/setup-node@v4
with:
@@ -176,6 +176,7 @@ jobs:
path: ./
key: web3-${{ matrix.node }}-${{github.sha}}
- run: yarn test:unit
+ continue-on-error: ${{ matrix.node == '20.17.0' }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
diff --git a/packages/web3-core/test/config/jest.config.js b/packages/web3-core/test/config/jest.config.js
index 74597df99d0..28d62955096 100644
--- a/packages/web3-core/test/config/jest.config.js
+++ b/packages/web3-core/test/config/jest.config.js
@@ -40,4 +40,5 @@ module.exports = {
* This can be done programmatically using jest.resetModules().
*/
resetModules: true,
+ testTimeout: 600000,
};
diff --git a/packages/web3-eth-abi/test/config/jest.config.js b/packages/web3-eth-abi/test/config/jest.config.js
index 74597df99d0..28d62955096 100644
--- a/packages/web3-eth-abi/test/config/jest.config.js
+++ b/packages/web3-eth-abi/test/config/jest.config.js
@@ -40,4 +40,5 @@ module.exports = {
* This can be done programmatically using jest.resetModules().
*/
resetModules: true,
+ testTimeout: 600000,
};
diff --git a/packages/web3-eth-contract/test/config/jest.config.js b/packages/web3-eth-contract/test/config/jest.config.js
index 74597df99d0..28d62955096 100644
--- a/packages/web3-eth-contract/test/config/jest.config.js
+++ b/packages/web3-eth-contract/test/config/jest.config.js
@@ -40,4 +40,5 @@ module.exports = {
* This can be done programmatically using jest.resetModules().
*/
resetModules: true,
+ testTimeout: 600000,
};
diff --git a/packages/web3-eth-ens/test/integration/setup.js b/packages/web3-eth-ens/test/integration/setup.js
index 59b1f904213..c480060944a 100644
--- a/packages/web3-eth-ens/test/integration/setup.js
+++ b/packages/web3-eth-ens/test/integration/setup.js
@@ -19,6 +19,3 @@ along with web3.js. If not, see .
// eslint-disable-next-line @typescript-eslint/no-require-imports
require('../config/setup');
-const jestTimeout = 30000;
-
-jest.setTimeout(jestTimeout);
diff --git a/packages/web3-eth-personal/test/config/jest.config.js b/packages/web3-eth-personal/test/config/jest.config.js
index 74597df99d0..28d62955096 100644
--- a/packages/web3-eth-personal/test/config/jest.config.js
+++ b/packages/web3-eth-personal/test/config/jest.config.js
@@ -40,4 +40,5 @@ module.exports = {
* This can be done programmatically using jest.resetModules().
*/
resetModules: true,
+ testTimeout: 600000,
};
diff --git a/packages/web3-eth/test/e2e/setup.js b/packages/web3-eth/test/e2e/setup.js
index fddbec59a1e..c480060944a 100644
--- a/packages/web3-eth/test/e2e/setup.js
+++ b/packages/web3-eth/test/e2e/setup.js
@@ -19,6 +19,3 @@ along with web3.js. If not, see .
// eslint-disable-next-line @typescript-eslint/no-require-imports
require('../config/setup');
-const jestTimeout = 30000; // Sometimes `in3` takes long time because of its decentralized nature.
-
-jest.setTimeout(jestTimeout);
diff --git a/packages/web3-net/test/config/jest.config.js b/packages/web3-net/test/config/jest.config.js
index 74597df99d0..28d62955096 100644
--- a/packages/web3-net/test/config/jest.config.js
+++ b/packages/web3-net/test/config/jest.config.js
@@ -40,4 +40,5 @@ module.exports = {
* This can be done programmatically using jest.resetModules().
*/
resetModules: true,
+ testTimeout: 600000,
};
diff --git a/packages/web3-providers-ipc/test/config/jest.config.js b/packages/web3-providers-ipc/test/config/jest.config.js
index 068de35aa8e..5fc38b688f1 100644
--- a/packages/web3-providers-ipc/test/config/jest.config.js
+++ b/packages/web3-providers-ipc/test/config/jest.config.js
@@ -42,4 +42,5 @@ module.exports = {
resetModules: true,
resetMocks: true,
+ testTimeout: 600000,
};
diff --git a/packages/web3-types/test/config/jest.config.js b/packages/web3-types/test/config/jest.config.js
index 7d959c45719..360e22458fb 100644
--- a/packages/web3-types/test/config/jest.config.js
+++ b/packages/web3-types/test/config/jest.config.js
@@ -37,4 +37,5 @@ module.exports = {
* This can be done programmatically using jest.resetModules().
*/
resetModules: true,
+ testTimeout: 600000,
};
diff --git a/packages/web3-utils/test/config/jest.config.js b/packages/web3-utils/test/config/jest.config.js
index 74597df99d0..28d62955096 100644
--- a/packages/web3-utils/test/config/jest.config.js
+++ b/packages/web3-utils/test/config/jest.config.js
@@ -40,4 +40,5 @@ module.exports = {
* This can be done programmatically using jest.resetModules().
*/
resetModules: true,
+ testTimeout: 600000,
};
diff --git a/packages/web3-validator/test/config/jest.config.js b/packages/web3-validator/test/config/jest.config.js
index 74597df99d0..28d62955096 100644
--- a/packages/web3-validator/test/config/jest.config.js
+++ b/packages/web3-validator/test/config/jest.config.js
@@ -40,4 +40,5 @@ module.exports = {
* This can be done programmatically using jest.resetModules().
*/
resetModules: true,
+ testTimeout: 600000,
};
diff --git a/packages/web3/test/config/jest.config.js b/packages/web3/test/config/jest.config.js
index 74597df99d0..d61c13316fa 100644
--- a/packages/web3/test/config/jest.config.js
+++ b/packages/web3/test/config/jest.config.js
@@ -40,4 +40,5 @@ module.exports = {
* This can be done programmatically using jest.resetModules().
*/
resetModules: true,
+ testTimeout: 600000,
};
diff --git a/packages/web3/test/e2e/setup.js b/packages/web3/test/e2e/setup.js
index fddbec59a1e..c480060944a 100644
--- a/packages/web3/test/e2e/setup.js
+++ b/packages/web3/test/e2e/setup.js
@@ -19,6 +19,3 @@ along with web3.js. If not, see .
// eslint-disable-next-line @typescript-eslint/no-require-imports
require('../config/setup');
-const jestTimeout = 30000; // Sometimes `in3` takes long time because of its decentralized nature.
-
-jest.setTimeout(jestTimeout);
diff --git a/packages/web3/test/integration/setup.js b/packages/web3/test/integration/setup.js
index fddbec59a1e..c480060944a 100644
--- a/packages/web3/test/integration/setup.js
+++ b/packages/web3/test/integration/setup.js
@@ -19,6 +19,3 @@ along with web3.js. If not, see .
// eslint-disable-next-line @typescript-eslint/no-require-imports
require('../config/setup');
-const jestTimeout = 30000; // Sometimes `in3` takes long time because of its decentralized nature.
-
-jest.setTimeout(jestTimeout);
diff --git a/packages/web3/test/stress/setup.js b/packages/web3/test/stress/setup.js
index e9757a61e1c..c480060944a 100644
--- a/packages/web3/test/stress/setup.js
+++ b/packages/web3/test/stress/setup.js
@@ -19,6 +19,3 @@ along with web3.js. If not, see .
// eslint-disable-next-line @typescript-eslint/no-require-imports
require('../config/setup');
-const jestTimeout = 300000;
-
-jest.setTimeout(jestTimeout);
diff --git a/templates/jest.config.js.tmpl b/templates/jest.config.js.tmpl
index e4d70e55a94..d8144cd41e9 100644
--- a/templates/jest.config.js.tmpl
+++ b/templates/jest.config.js.tmpl
@@ -57,4 +57,5 @@ module.exports = {
* This can be done programmatically using jest.resetModules().
*/
resetModules: true,
+ testTimeout: 600000,
};