From 9e62fcd8de0b35806364675b0ebc07b2ae12f321 Mon Sep 17 00:00:00 2001 From: Rodolphe Marques Date: Thu, 21 Sep 2023 12:06:04 +0200 Subject: [PATCH 1/5] feat: move support from node 16 to node 18 --- .github/workflows/release-github.yml | 2 +- .github/workflows/release-npm.yml | 2 +- .github/workflows/testing-nightly.yml | 10 +++++----- .github/workflows/testing-node.yml | 2 +- .github/workflows/testing.yml | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release-github.yml b/.github/workflows/release-github.yml index 63d353d27..7c3c16151 100644 --- a/.github/workflows/release-github.yml +++ b/.github/workflows/release-github.yml @@ -19,7 +19,7 @@ jobs: # Build process - uses: actions/setup-node@v3 with: - node-version: '16.x' + node-version: 18 - name: Set version to env run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV diff --git a/.github/workflows/release-npm.yml b/.github/workflows/release-npm.yml index d8c659568..eb8bf61fe 100644 --- a/.github/workflows/release-npm.yml +++ b/.github/workflows/release-npm.yml @@ -15,7 +15,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: '16' + node-version: 18 registry-url: https://registry.npmjs.org/ - run: yarn install --frozen-lockfile --ignore-engines - run: npm publish --access public diff --git a/.github/workflows/testing-nightly.yml b/.github/workflows/testing-nightly.yml index 0ad806eb1..4d678317c 100644 --- a/.github/workflows/testing-nightly.yml +++ b/.github/workflows/testing-nightly.yml @@ -11,7 +11,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 - name: Install dependencies run: | @@ -55,7 +55,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 - uses: nevermined-io/nvm-tools-actions@v0.14.0 with: token: ${{ secrets.API_TOKEN_GITHUB }} @@ -97,7 +97,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 - uses: nevermined-io/nvm-tools-actions@v0.14.0 with: token: ${{ secrets.API_TOKEN_GITHUB }} @@ -131,7 +131,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 - uses: nevermined-io/nvm-tools-actions@v0.14.0 with: token: ${{ secrets.API_TOKEN_GITHUB }} @@ -167,7 +167,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 - name: Install dependencies run: | diff --git a/.github/workflows/testing-node.yml b/.github/workflows/testing-node.yml index 6d5a045f9..36849872b 100644 --- a/.github/workflows/testing-node.yml +++ b/.github/workflows/testing-node.yml @@ -10,7 +10,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 - uses: actions/checkout@v3 with: repository: nevermined-io/node diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 095a5f425..03d644dfe 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -10,7 +10,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 - uses: nevermined-io/nvm-tools-actions@v0.14.0 with: token: ${{ secrets.API_TOKEN_GITHUB }} @@ -55,7 +55,7 @@ jobs: token: ${{ secrets.API_TOKEN_GITHUB }} - uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 - name: Deploy contracts run: | From 104ce3e2f634b6661b7af5c99850a4a27897d100 Mon Sep 17 00:00:00 2001 From: Rodolphe Marques Date: Thu, 21 Sep 2023 12:08:36 +0200 Subject: [PATCH 2/5] chore: update node version in .nvmrc --- .nvmrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.nvmrc b/.nvmrc index dae199aec..3c032078a 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v12 +18 From 4cf5a1c73b03533e66e96ef0e14486e2f3093265 Mon Sep 17 00:00:00 2001 From: Rodolphe Marques Date: Wed, 27 Sep 2023 15:11:36 +0200 Subject: [PATCH 3/5] chore: reclaim some space in the CI unit-tests job --- .github/workflows/testing.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 7786a7cd0..3445f1124 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -48,6 +48,8 @@ jobs: runs-on: ubuntu-latest steps: + - name: Reclaim some disk space + run: docker system prune --all --volumes -f - uses: actions/checkout@v3 - uses: actions/checkout@v3 with: From 64cb9dfb4674c88aeebcf463c500f5691f7778d1 Mon Sep 17 00:00:00 2001 From: Rodolphe Marques Date: Wed, 27 Sep 2023 15:12:23 +0200 Subject: [PATCH 4/5] chore: prettier --- integration/nevermined/Assets.test.ts | 1 - src/services/node/NeverminedNode.ts | 4 ++-- test/config.ts | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/integration/nevermined/Assets.test.ts b/integration/nevermined/Assets.test.ts index 0e5623872..e119af427 100644 --- a/integration/nevermined/Assets.test.ts +++ b/integration/nevermined/Assets.test.ts @@ -322,7 +322,6 @@ describe('Assets', () => { console.debug(`It should fail with error: ${err}`) assert.isDefined(err) }) - }) }) diff --git a/src/services/node/NeverminedNode.ts b/src/services/node/NeverminedNode.ts index 7e80b8291..e158d2fb2 100644 --- a/src/services/node/NeverminedNode.ts +++ b/src/services/node/NeverminedNode.ts @@ -403,10 +403,10 @@ export class NeverminedNode extends Instantiable { nftType: ercType, serviceIndex: serviceIndex && serviceIndex >= 0 ? serviceIndex : -1, }) - + this.logger.log(`Claiming NFT using endpoint: ${claimNFTEndpoint}`) const response = await this.nevermined.utils.fetch.post(claimNFTEndpoint, claimBody) - + if (!response.ok) { throw new HttpError(`${response.statusText} ${response.url}`, response.status) } diff --git a/test/config.ts b/test/config.ts index 156834966..e1074ae9b 100644 --- a/test/config.ts +++ b/test/config.ts @@ -3,7 +3,6 @@ import { LoggerInstance } from '../src/utils' LoggerInstance.setLevel(LogLevel.Error) - const config = { marketplaceUri: 'http://localhost:3100', neverminedNodeUri: 'http://localhost:8030', From 8a71dbdf18624b668c4f5f6f882e3178fe756d0d Mon Sep 17 00:00:00 2001 From: Rodolphe Marques Date: Wed, 27 Sep 2023 15:42:29 +0200 Subject: [PATCH 5/5] fix: connection to ganache --- .github/workflows/testing.yml | 2 +- package.json | 2 +- test/config.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 3445f1124..ce6ba5959 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -81,7 +81,7 @@ jobs: - name: Start ganache env: SEED_WORDS: ${{ secrets.seedWords }} - run: yarn ganache --port 18545 --chain.chainId 8998 --wallet.mnemonic "$SEED_WORDS" --detach + run: yarn ganache --server.port 18545 --chain.chainId 8998 --wallet.mnemonic "$SEED_WORDS" --detach - name: Run unit tests env: diff --git a/package.json b/package.json index 0f25b381f..643f0b3bf 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-tsdoc": "^0.2.16", "express": "^4.18.2", - "ganache": "^7.9.0", + "ganache": "^7.9.1", "http-proxy": "^1.18.1", "husky": "^8.0.3", "lint-staged": "^13.0.4", diff --git a/test/config.ts b/test/config.ts index e1074ae9b..aee61e244 100644 --- a/test/config.ts +++ b/test/config.ts @@ -7,7 +7,7 @@ const config = { marketplaceUri: 'http://localhost:3100', neverminedNodeUri: 'http://localhost:8030', neverminedNodeAddress: '0x068ed00cf0441e4829d9784fcbe7b9e26d4bd8d0', - web3ProviderUri: `http://localhost:${process.env.ETH_PORT || 8545}`, + web3ProviderUri: `http://127.0.0.1:${process.env.ETH_PORT || 8545}`, verbose: LogLevel.Error, artifactsFolder: './artifacts', circuitsFolder: './circuits',