From e287c55e287183fbe3ace5f0c3a90080bfa0c633 Mon Sep 17 00:00:00 2001 From: nghaninn <43451336+nghaninn@users.noreply.github.com> Date: Sun, 10 Nov 2024 23:43:08 +0800 Subject: [PATCH 1/3] fix: add node 20 support --- .github/workflows/tests.yml | 22 ++++++++++++++-------- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1d85910f..1a69724e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,23 +8,29 @@ name: "Tests" jobs: run-tests: - name: Run Tests + name: Run Tests Node ${{ matrix.node }} runs-on: ubuntu-latest + strategy: + matrix: + node: [ 18, 20 ] steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: 18.x + node-version: ${{ matrix.node }} - run: npm ci - run: npm run test:ci test-build: - name: Test Build + name: Test Build Node ${{ matrix.node }} runs-on: ubuntu-latest + strategy: + matrix: + node: [ 18, 20 ] steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: 18.x + node-version: ${{ matrix.node }} - run: npm ci - run: npm run build diff --git a/package-lock.json b/package-lock.json index d04d2ca7..d6927ad9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,7 +47,7 @@ "typescript": "^4.9.5" }, "engines": { - "node": "18.x" + "node": ">=18.x" } }, "node_modules/@babel/code-frame": { diff --git a/package.json b/package.json index 1ed46bef..5ab2d0e0 100644 --- a/package.json +++ b/package.json @@ -79,6 +79,6 @@ }, "snyk": true, "engines": { - "node": "18.x" + "node": ">=18.x" } } From de78bce8d2b79fee8a447eb96f4672f4dfca485b Mon Sep 17 00:00:00 2001 From: nghaninn <43451336+nghaninn@users.noreply.github.com> Date: Mon, 11 Nov 2024 15:30:00 +0800 Subject: [PATCH 2/3] chore: update ci --- .github/workflows/tests.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1a69724e..aca5836d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,29 +8,29 @@ name: "Tests" jobs: run-tests: - name: Run Tests Node ${{ matrix.node }} + name: Run Tests runs-on: ubuntu-latest strategy: matrix: - node: [ 18, 20 ] + node-version: [18.x, 20.x] steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node }} + node-version: ${{ matrix.node-version }} - run: npm ci - run: npm run test:ci test-build: - name: Test Build Node ${{ matrix.node }} + name: Test Build runs-on: ubuntu-latest strategy: matrix: - node: [ 18, 20 ] + node-version: [18.x, 20.x] steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node }} + node-version: ${{ matrix.node-version }} - run: npm ci - run: npm run build From e75ef8ca48e7b4e5c3af6bc8928bd264294f7b21 Mon Sep 17 00:00:00 2001 From: nghaninn <43451336+nghaninn@users.noreply.github.com> Date: Mon, 11 Nov 2024 17:05:30 +0800 Subject: [PATCH 3/3] chore: increase test timeout to 5 minutes --- .../tokenRegistry/ethereumAstronTokenRegistryStatus.test.ts | 2 ++ src/verifiers/issuerIdentity/did/didIdentityProof.test.ts | 2 ++ src/verify.v2.integration.test.ts | 2 ++ src/verify.v3.integration.test.ts | 2 ++ 4 files changed, 8 insertions(+) diff --git a/src/verifiers/documentStatus/tokenRegistry/ethereumAstronTokenRegistryStatus.test.ts b/src/verifiers/documentStatus/tokenRegistry/ethereumAstronTokenRegistryStatus.test.ts index 1f228be8..0fbdde7c 100644 --- a/src/verifiers/documentStatus/tokenRegistry/ethereumAstronTokenRegistryStatus.test.ts +++ b/src/verifiers/documentStatus/tokenRegistry/ethereumAstronTokenRegistryStatus.test.ts @@ -22,6 +22,8 @@ const options = { }), }; +jest.setTimeout(300_000); // 300 seconds + describe("test", () => { describe("v2", () => { it("should return true for documents using token registry", async () => { diff --git a/src/verifiers/issuerIdentity/did/didIdentityProof.test.ts b/src/verifiers/issuerIdentity/did/didIdentityProof.test.ts index 33e36aeb..ca314ecf 100644 --- a/src/verifiers/issuerIdentity/did/didIdentityProof.test.ts +++ b/src/verifiers/issuerIdentity/did/didIdentityProof.test.ts @@ -24,6 +24,8 @@ const options = { }), }; +jest.setTimeout(300_000); // 300 seconds + describe("skip", () => { it("should return skip message", async () => { const message = await openAttestationDidIdentityProof.skip(undefined as any, undefined as any); diff --git a/src/verify.v2.integration.test.ts b/src/verify.v2.integration.test.ts index e18a16cf..e38eac5d 100644 --- a/src/verify.v2.integration.test.ts +++ b/src/verify.v2.integration.test.ts @@ -38,6 +38,8 @@ const v2DnsDidSignedRevocationStoreButRevoked = v2DnsDidSignedRevocationStoreBut const verifyHomestead = verify; const verifySepolia = verificationBuilder(openAttestationVerifiers, { network: "sepolia" }); +jest.setTimeout(300_000); // 300 seconds + describe("verify(integration)", () => { let defaultEnvironment: NodeJS.ProcessEnv; beforeEach(() => { diff --git a/src/verify.v3.integration.test.ts b/src/verify.v3.integration.test.ts index 79740f9f..5f4dbe07 100644 --- a/src/verify.v3.integration.test.ts +++ b/src/verify.v3.integration.test.ts @@ -48,6 +48,8 @@ const verifySepolia = verificationBuilder([...openAttestationVerifiers, openAtte network: "sepolia", }); +jest.setTimeout(300_000); // 300 seconds + describe("verify v3(integration)", () => { beforeEach(() => { jest.resetModules();