-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update to async iterators (#73)
* chore: update to latest js-IPFS rc * refactor: updates to latest async iterator version of ipfs and libp2p Needs `ipfs.id` to return a `CID` before tests will pass. * chore: only build master branch and prs * refactor: ipfs will return peer ids as strings instead * refactor: remove ipfs and just use libp2p * fix: fix linting
- Loading branch information
1 parent
f4f8ebd
commit b8556ec
Showing
18 changed files
with
449 additions
and
557 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
'use strict' | ||
|
||
const Libp2p = require('libp2p') | ||
const PeerInfo = require('peer-info') | ||
const { config } = require('./test/utils/create-libp2p') | ||
|
||
let relay | ||
|
||
module.exports = { | ||
hooks: { | ||
pre: async () => { | ||
const peerInfo = await PeerInfo.create() | ||
peerInfo.multiaddrs.add('/ip4/127.0.0.1/tcp/24642/ws') | ||
|
||
const defaultConfig = await config() | ||
|
||
relay = new Libp2p({ | ||
...defaultConfig, | ||
peerInfo, | ||
config: { | ||
...defaultConfig.config, | ||
relay: { | ||
enabled: true, | ||
hop: { | ||
enabled: true | ||
} | ||
} | ||
} | ||
}) | ||
|
||
await relay.start() | ||
}, | ||
post: async () => { | ||
await relay.stop() | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
language: node_js | ||
branches: | ||
only: | ||
- master | ||
- /^release\/.*$/ | ||
cache: npm | ||
stages: | ||
- check | ||
- test | ||
- cov | ||
|
||
node_js: | ||
- '12' | ||
|
||
os: | ||
- linux | ||
- osx | ||
- windows | ||
|
||
script: npx nyc -s npm run test:node -- --bail | ||
after_success: npx nyc report --reporter=text-lcov > coverage.lcov && npx codecov | ||
|
||
jobs: | ||
include: | ||
- stage: check | ||
script: | ||
- npx aegir commitlint --travis | ||
- npx aegir dep-check | ||
- npm run lint | ||
|
||
- stage: test | ||
name: chrome | ||
addons: | ||
chrome: stable | ||
script: npx aegir test -t browser -t webworker | ||
|
||
- stage: test | ||
name: firefox | ||
addons: | ||
firefox: latest | ||
script: npx aegir test -t browser -t webworker -- --browsers FirefoxHeadless | ||
|
||
notifications: | ||
email: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.