Skip to content
This repository was archived by the owner on Apr 24, 2023. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: libp2p/js-libp2p-webrtc-star
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 983f46465a530f490d50a01d587bceafce821ba7
Choose a base ref
...
head repository: libp2p/js-libp2p-webrtc-star
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 590c5fc36a62631a0b0d102b56d60c091906c31c
Choose a head ref
Loading
42 changes: 27 additions & 15 deletions .aegir.js
Original file line number Diff line number Diff line change
@@ -2,33 +2,45 @@

const sigServer = require('./src/sig-server')
let firstRun = true
let sigS
let sigServers = []

async function boot (done) {
const options = {
async function boot () {
const options1 = {
port: 15555,
host: '127.0.0.1',
metrics: false // firsrun TODO: needs https://github.com/libp2p/js-libp2p-webrtc-star/issues/174
metrics: firstRun
}

if (firstRun) { firstRun = false }
const options2 = {
port: 15556,
host: '127.0.0.1',
metrics: false
}

const options3 = {
port: 15557,
host: '127.0.0.1',
metrics: false
}

sigS = await sigServer.start(options)
if (firstRun) { firstRun = false }

console.log('signalling on:', sigS.info.uri)
sigServers.push(await sigServer.start(options1))
sigServers.push(await sigServer.start(options2))
sigServers.push(await sigServer.start(options3))

done()
console.log('signalling on:')
sigServers.forEach((sig) => console.log(sig.info.uri))
}

async function stop (done) {
await sigS.stop()

done()
async function stop () {
await Promise.all(sigServers.map(s => s.stop()))
}

/** @type {import('aegir').PartialOptions} */
module.exports = {
hooks: {
pre: boot,
post: stop
test: {
before: boot,
after: stop
}
}
49 changes: 49 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: ci
on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm install
- run: npx aegir lint
- run: npx aegir dep-check -- -i wrtc -i electron-webrtc
- run: npx aegir build --no-types
test-node:
needs: check
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
node: [14, 16]
fail-fast: true
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- run: npm install @mapbox/node-pre-gyp -g
- run: npm install
- run: npm run test:node -- --cov --bail
- uses: codecov/codecov-action@v1
test-chrome:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm install
- run: npm run test:browser -- --bail
test-firefox:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm install
- run: npm run test:browser -- --browser firefox --bail
28 changes: 0 additions & 28 deletions .npmignore

This file was deleted.

41 changes: 0 additions & 41 deletions .travis.yml

This file was deleted.

Loading