From 0c12bf0a52222c1e132e3926c9cc1796732980c8 Mon Sep 17 00:00:00 2001 From: Jacob Heun Date: Tue, 9 Jul 2019 15:34:45 +0100 Subject: [PATCH] chore: use travis for ci (#50) --- .travis.yml | 42 ++++++++++++++++++++++++++++++++++++++++++ ci/Jenkinsfile | 2 -- example.js | 1 + package.json | 21 ++++++++++----------- test/handshake.spec.js | 4 ++-- 5 files changed, 55 insertions(+), 15 deletions(-) create mode 100644 .travis.yml delete mode 100644 ci/Jenkinsfile diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..33b2eaf --- /dev/null +++ b/.travis.yml @@ -0,0 +1,42 @@ +language: node_js +cache: npm +stages: + - check + - test + - cov + +node_js: + - '10' + - '12' + +os: + - linux + - osx + +script: npx nyc -s npm run test:node -- --bail +after_success: npx nyc report --reporter=text-lcov > coverage.lcov && npx codecov + +jobs: + include: + - os: windows + cache: false + + - stage: check + script: + - 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 \ No newline at end of file diff --git a/ci/Jenkinsfile b/ci/Jenkinsfile deleted file mode 100644 index a7da2e5..0000000 --- a/ci/Jenkinsfile +++ /dev/null @@ -1,2 +0,0 @@ -// 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. -javascript() diff --git a/example.js b/example.js index e8415af..71c5e5c 100644 --- a/example.js +++ b/example.js @@ -12,5 +12,6 @@ const conn = new Connection() // apply the multistream to the conn listener.handle(conn, () => { + // eslint-disable-next-line console.log('connection established') }) diff --git a/package.json b/package.json index a1a6083..1c64d57 100644 --- a/package.json +++ b/package.json @@ -22,8 +22,7 @@ "url": "git+https://github.com/multiformats/js-multistream-select.git" }, "pre-push": [ - "lint", - "test" + "lint" ], "keywords": [ "node", @@ -42,22 +41,22 @@ }, "license": "MIT", "dependencies": { - "interface-connection": "~0.3.2", - "async": "^2.6.0", - "debug": "^4.1.0", + "interface-connection": "~0.3.3", + "async": "^3.1.0", + "debug": "^4.1.1", "once": "^1.4.0", "pull-handshake": "^1.1.4", - "pull-length-prefixed": "^1.3.1", - "pull-stream": "^3.6.7", - "semver": "^5.5.0", + "pull-length-prefixed": "^1.3.3", + "pull-stream": "^3.6.13", + "semver": "^6.2.0", "varint": "^5.0.0" }, "devDependencies": { - "aegir": "^18.0.3", - "chai": "^4.1.2", + "aegir": "^19.0.5", + "chai": "^4.2.0", "dirty-chai": "^2.0.1", - "libp2p-multiplex": "~0.5.1", "libp2p-spdy": "~0.13.1", + "pull-mplex": "~0.1.2", "pull-pair": "^1.1.0", "pump": "^3.0.0", "run-parallel": "^1.1.9", diff --git a/test/handshake.spec.js b/test/handshake.spec.js index ffa87a9..e8c2e07 100644 --- a/test/handshake.spec.js +++ b/test/handshake.spec.js @@ -12,14 +12,14 @@ const parallel = require('run-parallel') const series = require('run-series') const spdy = require('libp2p-spdy') -const multiplex = require('libp2p-multiplex') +const multiplex = require('pull-mplex') const util = require('./util') const createPair = util.createPair const options = [ { name: 'over pull-pair' }, { name: 'over spdy', muxer: spdy }, - { name: 'over multiplex', muxer: multiplex } + { name: 'over mplex', muxer: multiplex } ] options.forEach((option) => {