Skip to content
This repository has been archived by the owner on Aug 23, 2019. It is now read-only.

Commit

Permalink
chore: use travis
Browse files Browse the repository at this point in the history
  • Loading branch information
vasco-santos committed Mar 15, 2019
1 parent 0634c91 commit daec26e
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 41 deletions.
48 changes: 38 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,43 @@
# Warning: This file is automatically synced from https://github.com/ipfs/ci-sync so if you want to change it, please change it there and ask someone to sync all repositories.
sudo: false
language: node_js
cache: npm

matrix:
stages:
- check
- test
- cov

node_js:
- '10'

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:
- node_js: 8
env: CXX=g++-4.8
- 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

script:
- npm run test
- stage: test
name: firefox
addons:
firefox: latest
script:
- npx aegir test -t browser -t webworker -- --browsers FirefoxHeadless

before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
notifications:
email: false
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# libp2p-connection-manager

[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io)
[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/)
[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)
[![](https://coveralls.io/repos/github/libp2p/js-libp2p-connection-manager/badge.svg?branch=master)](https://coveralls.io/github/libp2p/js-libp2p-connection-manager?branch=master)
[![](https://travis-ci.org/libp2p/js-libp2p-connection-manager.svg?branch=master)](https://travis-ci.org/libp2p/js-libp2p-connection-manager)
[![](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)
![](https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square)
![](https://img.shields.io/badge/Node.js-%3E%3D4.0.0-orange.svg?style=flat-square)
[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://protocol.ai)
[![](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)
[![](https://img.shields.io/badge/freenode-%23libp2p-yellow.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23libp2p)
[![Coverage Status](https://coveralls.io/repos/github/libp2p/js-libp2p-connection-manager/badge.svg?branch=master)](https://coveralls.io/github/libp2p/js-libp2p-connection-manager?branch=master)
[![Travis CI](https://travis-ci.org/libp2p/js-libp2p-connection-manager.svg?branch=master)](https://travis-ci.org/libp2p/js-libp2p-connection-manager)
[![Dependency Status](https://david-dm.org/libp2p/js-libp2p-connection-manager.svg?style=flat-square)](https://david-dm.org/libp2p/js-libp2p-connection-manager) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)
[![](https://img.shields.io/badge/pm-waffle-yellow.svg?style=flat-square)](https://waffle.io/libp2p/js-libp2p-connection-manager)

> JavaScript connection manager for libp2p
Expand Down
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,27 @@
"test"
],
"devDependencies": {
"aegir": "^13.0.7",
"async": "^2.6.0",
"chai": "^4.1.2",
"aegir": "^18.2.1",
"async": "^2.6.2",
"chai": "^4.2.0",
"dirty-chai": "^2.0.1",
"ipfs-repo": "^0.19.0",
"libp2p": "^0.20.2",
"libp2p-multiplex": "^0.5.1",
"libp2p-secio": "^0.10.0",
"libp2p-tcp": "^0.12.0",
"lodash": "^4.17.10",
"multihashing-async": "^0.4.8",
"ipfs-repo": "~0.26.3",
"libp2p": "~0.24.4",
"libp2p-multiplex": "~0.5.1",
"libp2p-secio": "~0.11.1",
"libp2p-tcp": "~0.13.0",
"lodash": "^4.17.11",
"multihashing-async": "~0.5.2",
"ncp": "^2.0.0",
"os": "^0.1.1",
"peer-id": "^0.10.7",
"peer-info": "^0.14.1",
"rimraf": "^2.6.2",
"uuid": "^3.2.1"
"os": "~0.1.1",
"peer-id": "~0.12.2",
"peer-info": "~0.15.1",
"rimraf": "^2.6.3",
"uuid": "^3.3.2"
},
"dependencies": {
"debug": "^3.1.0",
"latency-monitor": "^0.2.1"
"debug": "^4.1.1",
"latency-monitor": "~0.2.1"
},
"contributors": [
"David Dias <daviddias.p@gmail.com>",
Expand Down
17 changes: 11 additions & 6 deletions test/utils/create-libp2p-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,26 @@ class Node extends libp2p {

const modules = {
transport: [new TCP()],
connection: {
muxer: Multiplex,
crypto: SECIO
}
streamMuxer: [
Multiplex
],
connEncryption: [
SECIO
]
}

super(modules, peerInfo, null, options.DHT || {})
super({
modules,
peerInfo
})
}
}

function createLibp2pNode (options, callback) {
let node

waterfall([
(cb) => PeerId.create({bits: 1024}, cb),
(cb) => PeerId.create({ bits: 1024 }, cb),
(id, cb) => PeerInfo.create(id, cb),
(peerInfo, cb) => {
peerInfo.multiaddrs.add('/ip4/127.0.0.1/tcp/0')
Expand Down

0 comments on commit daec26e

Please sign in to comment.