Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit ceb15c8

Browse files
committed
chore: run interop tests as part of the build
Also tag last successful build and ensure we do not get stealth multiaddr@v7
1 parent 3878f0f commit ceb15c8

File tree

4 files changed

+29
-6
lines changed

4 files changed

+29
-6
lines changed

.aegir.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const preloadNode = MockPreloadNode.createNode()
1010
const echoServer = EchoServer.createServer()
1111

1212
module.exports = {
13-
bundlesize: { maxSize: '689kB' },
13+
bundlesize: { maxSize: '696kB' },
1414
webpack: {
1515
resolve: {
1616
mainFields: ['browser', 'main'],

.travis.yml

+19-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ cache: false
77
stages:
88
- check
99
- test
10-
- cov
10+
- tag
1111

1212
node_js:
1313
- '10'
@@ -18,8 +18,14 @@ os:
1818
- osx
1919
- windows
2020

21+
env:
22+
# This stops Windows builds from hanging
23+
# https://travis-ci.community/t/timeout-after-build-finished-and-succeeded/1336
24+
- YARN_GPG=no
25+
2126
script: npx nyc -s npx aegir test -t node --timeout 10000 --bail
22-
after_success: npx nyc report --reporter=text-lcov > coverage.lcov && npx codecov
27+
after_success:
28+
- npx nyc report --reporter=text-lcov > coverage.lcov && npx codecov
2329

2430
jobs:
2531
include:
@@ -55,5 +61,16 @@ jobs:
5561
script:
5662
- xvfb-run npx aegir test -t electron-renderer -- --bail --timeout 10000
5763

64+
- stage: test
65+
name: interop
66+
script:
67+
- npm run test:interop
68+
69+
- stage: tag
70+
if: branch = master AND type = push AND fork = false
71+
name: update-last-successful-build
72+
script:
73+
- npx aegir update-last-successful-build
74+
5875
notifications:
5976
email: false

package.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"test:node:cli": "aegir test -t node -f test/cli/index.js",
4949
"test:node:interface": "aegir test -t node -f test/core/interface.spec.js",
5050
"test:bootstrapers": "IPFS_TEST=bootstrapers aegir test -t browser -f test/bootstrapers.js",
51+
"test:interop": "IPFS_JS_EXEC=$PWD/src/cli/bin.js ipfs-interop",
5152
"coverage": "nyc --reporter=text --reporter=lcov npm run test:node",
5253
"benchmark": "echo \"Error: no benchmarks yet\" && exit 1",
5354
"benchmark:node": "echo \"Error: no benchmarks yet\" && exit 1",
@@ -140,7 +141,7 @@
140141
"libp2p-websocket-star-multi": "~0.4.3",
141142
"libp2p-websockets": "~0.12.3",
142143
"lodash": "^4.17.15",
143-
"mafmt": "^6.0.2",
144+
"mafmt": "^6.0.10",
144145
"merge-options": "^1.0.1",
145146
"mime-types": "^2.1.21",
146147
"mkdirp": "~0.5.1",
@@ -185,7 +186,7 @@
185186
"yargs-promise": "^1.1.0"
186187
},
187188
"devDependencies": {
188-
"aegir": "^20.0.0",
189+
"aegir": "^20.1.0",
189190
"base64url": "^3.0.1",
190191
"chai": "^4.2.0",
191192
"clear-module": "^4.0.0",
@@ -197,6 +198,7 @@
197198
"form-data": "^2.5.1",
198199
"hat": "0.0.3",
199200
"interface-ipfs-core": "^0.113.0",
201+
"ipfs-interop": "~0.1.0",
200202
"ipfsd-ctl": "~0.46.0",
201203
"libp2p-websocket-star": "~0.10.2",
202204
"ncp": "^2.0.0",

src/core/components/libp2p.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,11 @@ function defaultBundle ({ datastore, peerInfo, peerBook, options, config }) {
6161
}
6262

6363
const getPubsubRouter = () => {
64-
const router = get(config, 'Pubsub.Router', 'gossipsub')
64+
let router = get(config, 'Pubsub.Router', 'gossipsub')
65+
66+
if (!router) {
67+
router = 'gossipsub'
68+
}
6569

6670
if (!PubsubRouters[router]) {
6771
throw errCode(new Error(`Router unavailable. Configure libp2p.modules.pubsub to use the ${router} router.`), 'ERR_NOT_SUPPORTED')

0 commit comments

Comments
 (0)