From ebe552e39896ee5489a6bef857be0b621648278c Mon Sep 17 00:00:00 2001 From: achingbrain Date: Fri, 2 Jun 2023 17:25:33 +0100 Subject: [PATCH 1/6] test: run tests on webkit Adds a `test:webkit` script so we can run tests on webkit in CI. --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index c134617..2a33ea6 100644 --- a/package.json +++ b/package.json @@ -128,6 +128,7 @@ "test": "aegir test -t browser", "test:chrome": "aegir test -t browser --cov", "test:firefox": "aegir test -t browser --browser firefox", + "test:webkit": "aegir test -t browser -- --browser webkit", "lint": "aegir lint", "lint:fix": "aegir lint --fix", "clean": "aegir clean", From 90165985c196ff32dd93de2e352c93bc76df940c Mon Sep 17 00:00:00 2001 From: chad Date: Tue, 6 Jun 2023 21:46:04 -0500 Subject: [PATCH 2/6] deps: updated deps --- package.json | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index ebc8d10..df26002 100644 --- a/package.json +++ b/package.json @@ -136,18 +136,18 @@ "release": "aegir release" }, "dependencies": { - "@chainsafe/libp2p-noise": "^12.0.0", - "@libp2p/interface-connection": "^5.0.2", + "@chainsafe/libp2p-noise": "^12.0.1", + "@libp2p/interface-connection": "^5.1.0", "@libp2p/interface-metrics": "^4.0.8", "@libp2p/interface-peer-id": "^2.0.2", "@libp2p/interface-registrar": "^2.0.12", "@libp2p/interface-stream-muxer": "^4.1.2", "@libp2p/interface-transport": "^4.0.3", "@libp2p/interfaces": "^3.3.2", - "@libp2p/logger": "^2.0.7", + "@libp2p/logger": "^2.1.1", "@libp2p/peer-id": "^2.0.3", - "@multiformats/mafmt": "^12.1.2", - "@multiformats/multiaddr": "^12.1.2", + "@multiformats/mafmt": "^12.1.5", + "@multiformats/multiaddr": "^12.1.3", "abortable-iterator": "^5.0.1", "detect-browser": "^5.3.0", "it-length-prefixed": "^9.0.1", @@ -164,21 +164,21 @@ "uint8arrays": "^4.0.3" }, "devDependencies": { - "@chainsafe/libp2p-yamux": "^4.0.1", - "@libp2p/interface-libp2p": "^3.1.0", + "@chainsafe/libp2p-yamux": "^4.0.2", + "@libp2p/interface-libp2p": "^3.2.0", "@libp2p/interface-mocks": "^12.0.1", "@libp2p/peer-id-factory": "^2.0.3", - "@libp2p/websockets": "^6.0.1", - "@types/sinon": "^10.0.14", - "aegir": "^39.0.7", - "delay": "^5.0.0", + "@libp2p/websockets": "^6.0.3", + "@types/sinon": "^10.0.15", + "aegir": "^39.0.9", + "delay": "^6.0.0", "it-all": "^3.0.2", "it-length": "^3.0.2", "it-map": "^3.0.3", "it-pair": "^2.0.6", - "libp2p": "^0.45.0", + "libp2p": "^0.45.5", "protons": "^7.0.2", - "sinon": "^15.0.4", + "sinon": "^15.1.0", "sinon-ts": "^1.0.0" } } From c370f246eee81ddd607f934bdd3e109292796026 Mon Sep 17 00:00:00 2001 From: chad Date: Tue, 6 Jun 2023 22:03:33 -0500 Subject: [PATCH 3/6] ci: updated webkit test workflow --- .github/workflows/js-test-and-release.yml | 39 +++++++++++++---------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/.github/workflows/js-test-and-release.yml b/.github/workflows/js-test-and-release.yml index 614a1d8..148fa84 100644 --- a/.github/workflows/js-test-and-release.yml +++ b/.github/workflows/js-test-and-release.yml @@ -9,17 +9,16 @@ on: pull_request: jobs: - check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: lts/* - - uses: ipfs/aegir/actions/cache-node-modules@master - - run: npm run --if-present lint - - run: npm run --if-present dep-check + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: lts/* + - uses: ipfs/aegir/actions/cache-node-modules@master + - run: npm run --if-present lint + - run: npm run --if-present dep-check test-node: needs: check @@ -98,21 +97,18 @@ jobs: test-webkit: needs: check - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, macos-latest] - node: [lts/*] - fail-fast: true + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: node-version: lts/* - uses: ipfs/aegir/actions/cache-node-modules@master + - run: npx playwright install-deps - run: npm run --if-present test:webkit - - uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1 + - uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0 with: + directory: ./.nyc_output flags: webkit test-webkit-webworker: @@ -163,7 +159,18 @@ jobs: flags: electron-renderer release: - needs: [test-node, test-chrome, test-chrome-webworker, test-firefox, test-firefox-webworker, test-webkit, test-webkit-webworker, test-electron-main, test-electron-renderer] + needs: + [ + test-node, + test-chrome, + test-chrome-webworker, + test-firefox, + test-firefox-webworker, + test-webkit, + test-webkit-webworker, + test-electron-main, + test-electron-renderer, + ] runs-on: ubuntu-latest if: github.event_name == 'push' && github.ref == 'refs/heads/main' steps: From 74981b1cbf11ae5210b7501dfec838a9f13988b7 Mon Sep 17 00:00:00 2001 From: chad Date: Thu, 8 Jun 2023 13:05:30 -0500 Subject: [PATCH 4/6] test: remove teardown --- package.json | 2 +- test/basics.spec.ts | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index df26002..193ca8e 100644 --- a/package.json +++ b/package.json @@ -161,7 +161,7 @@ "p-event": "^5.0.1", "protons-runtime": "^5.0.0", "uint8arraylist": "^2.4.3", - "uint8arrays": "^4.0.3" + "uint8arrays": "^4.0.4" }, "devDependencies": { "@chainsafe/libp2p-yamux": "^4.0.2", diff --git a/test/basics.spec.ts b/test/basics.spec.ts index 2f9efed..d45f144 100644 --- a/test/basics.spec.ts +++ b/test/basics.spec.ts @@ -58,15 +58,16 @@ describe('basics', () => { remoteNode = await createNode() }) - afterEach(async () => { - if (localNode != null) { - await localNode.stop() - } + // This is currently causing issues on macOS runs + // afterEach(async () => { + // if (localNode != null) { + // await localNode.stop() + // } - if (remoteNode != null) { - await remoteNode.stop() - } - }) + // if (remoteNode != null) { + // await remoteNode.stop() + // } + // }) it('can dial through a relay', async () => { const remoteAddr = remoteNode.getMultiaddrs() From 747b5855f6ceadfcdcf1abde965de94f6ef5a4e5 Mon Sep 17 00:00:00 2001 From: chad Date: Thu, 8 Jun 2023 18:00:21 -0500 Subject: [PATCH 5/6] test: run webkit tests on mac OS --- .github/workflows/js-test-and-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/js-test-and-release.yml b/.github/workflows/js-test-and-release.yml index 148fa84..1ff145b 100644 --- a/.github/workflows/js-test-and-release.yml +++ b/.github/workflows/js-test-and-release.yml @@ -97,7 +97,7 @@ jobs: test-webkit: needs: check - runs-on: ubuntu-latest + runs-on: macos-latest steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 From 6492f507e62a37176c9536d3dcb858c20419449d Mon Sep 17 00:00:00 2001 From: chad Date: Fri, 16 Jun 2023 10:40:55 -0500 Subject: [PATCH 6/6] test: remove unused teardown --- test/basics.spec.ts | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/test/basics.spec.ts b/test/basics.spec.ts index ac75d34..49a7787 100644 --- a/test/basics.spec.ts +++ b/test/basics.spec.ts @@ -85,17 +85,6 @@ describe('basics', () => { remoteNode = await createNode() }) - // This is currently causing issues on macOS runs - // afterEach(async () => { - // if (localNode != null) { - // await localNode.stop() - // } - - // if (remoteNode != null) { - // await remoteNode.stop() - // } - // }) - it('can dial through a relay', async () => { const connection = await connectNodes()