Skip to content

Commit

Permalink
deps(dev): bump aegir from 40.0.13 to 41.1.11 (#137)
Browse files Browse the repository at this point in the history
Bumps [aegir](https://github.com/ipfs/aegir) from 40.0.13 to 41.1.11.
- [Release notes](https://github.com/ipfs/aegir/releases)
- [Changelog](https://github.com/ipfs/aegir/blob/master/CHANGELOG.md)
- [Commits](ipfs/aegir@v40.0.13...v41.1.11)

---
updated-dependencies:
- dependency-name: aegir
  dependency-type: direct:development
  update-type: version-update:semver-major
...

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: achingbrain <alex@achingbrain.net>
  • Loading branch information
dependabot[bot] and achingbrain authored Nov 30, 2023
1 parent bf3d9e1 commit 872cba5
Show file tree
Hide file tree
Showing 5 changed files with 260 additions and 40 deletions.
195 changes: 187 additions & 8 deletions .github/workflows/js-test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: test & maybe release
on:
push:
branches:
- master
- main
pull_request:
workflow_dispatch:

Expand All @@ -16,10 +16,189 @@ concurrency:
cancel-in-progress: true

jobs:
js-test-and-release:
uses: pl-strflt/uci/.github/workflows/js-test-and-release.yml@v0.0
secrets:
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
UCI_GITHUB_TOKEN: ${{ secrets.UCI_GITHUB_TOKEN }}
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run --if-present lint
- run: npm run --if-present dep-check
- run: npm run --if-present doc-check

test-node:
needs: check
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
node: [lts/*]
fail-fast: true
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run --if-present test:node
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
with:
flags: node
files: .coverage/*,packages/*/.coverage/*

test-chrome:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run --if-present test:chrome
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
with:
flags: chrome
files: .coverage/*,packages/*/.coverage/*

test-chrome-webworker:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run --if-present test:chrome-webworker
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
with:
flags: chrome-webworker
files: .coverage/*,packages/*/.coverage/*

test-firefox:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run --if-present test:firefox
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
with:
flags: firefox
files: .coverage/*,packages/*/.coverage/*

test-firefox-webworker:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run --if-present test:firefox-webworker
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
with:
flags: firefox-webworker
files: .coverage/*,packages/*/.coverage/*

test-webkit:
needs: check
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
node: [lts/*]
fail-fast: true
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run --if-present test:webkit
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
with:
flags: webkit
files: .coverage/*,packages/*/.coverage/*

test-webkit-webworker:
needs: check
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
node: [lts/*]
fail-fast: true
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npm run --if-present test:webkit-webworker
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
with:
flags: webkit-webworker
files: .coverage/*,packages/*/.coverage/*

test-electron-main:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npx xvfb-maybe npm run --if-present test:electron-main
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
with:
flags: electron-main
files: .coverage/*,packages/*/.coverage/*

test-electron-renderer:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- run: npx xvfb-maybe npm run --if-present test:electron-renderer
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
with:
flags: electron-renderer
files: .coverage/*,packages/*/.coverage/*

release:
needs: [test-node, test-chrome, test-chrome-webworker, test-firefox, test-firefox-webworker, test-webkit, test-webkit-webworker, test-electron-main, test-electron-renderer]
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
permissions:
id-token: write
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: lts/*
- uses: ipfs/aegir/actions/cache-node-modules@master
- uses: ipfs/aegir/actions/docker-login@master
with:
docker-token: ${{ secrets.DOCKER_TOKEN }}
docker-username: ${{ secrets.DOCKER_USERNAME }}
- run: npm run --if-present release
env:
GITHUB_TOKEN: ${{ secrets.UCI_GITHUB_TOKEN || github.token }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
34 changes: 12 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,15 @@
# @libp2p/interop <!-- omit in toc -->

[![libp2p.io](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)
[![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)
[![codecov](https://img.shields.io/codecov/c/github/libp2p/interop.svg?style=flat-square)](https://codecov.io/gh/libp2p/interop)
[![CI](https://img.shields.io/github/actions/workflow/status/libp2p/interop/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/libp2p/interop/actions/workflows/js-test-and-release.yml?query=branch%3Amaster)
[![CI](https://img.shields.io/github/actions/workflow/status/libp2p/interop/js-test-and-release.yml?branch=main\&style=flat-square)](https://github.com/libp2p/interop/actions/workflows/js-test-and-release.yml?query=branch%3Amain)

> Interoperability Tests for libp2p
## Table of contents <!-- omit in toc -->

- [Install](#install)
- [Usage](#usage)
- [Running the tests](#running-the-tests)
- [License](#license)
- [Contribution](#contribution)

## Install

```console
$ npm i @libp2p/interop
```
# About

This repository will be used for interop tests.
This repository holds interop tests for testing compatibility between different libp2p implementations.

## Usage

### Running the tests
## Example - How to run the tests

Create a js file that configures the different types of daemon:

Expand Down Expand Up @@ -63,13 +47,19 @@ main().catch(err => {

For an example, see the js-libp2p interop test runner.

## License
# Install

```console
$ npm i @libp2p/interop
```

# License

Licensed under either of

- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)

## Contribution
# Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
18 changes: 10 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
"bugs": {
"url": "https://github.com/libp2p/interop/issues"
},
"publishConfig": {
"access": "public",
"provenance": true
},
"keywords": [
"libp2p"
],
"engines": {
"node": ">=16.0.0",
"npm": ">=7.0.0"
},
"type": "module",
"types": "./dist/src/index.d.ts",
"files": [
Expand All @@ -35,12 +35,13 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
}
},
"release": {
"branches": [
"master"
"main"
],
"plugins": [
[
Expand Down Expand Up @@ -130,7 +131,8 @@
"dep-check": "aegir dep-check",
"build": "aegir build --bundle false",
"postbuild": "cp src/resources/keys/*.key dist/src/resources/keys",
"release": "aegir release"
"release": "aegir release",
"docs": "aegir docs"
},
"dependencies": {
"@libp2p/daemon-client": "^7.0.0",
Expand All @@ -141,8 +143,8 @@
"it-all": "^3.0.1",
"it-first": "^3.0.1",
"it-handshake": "^4.1.2",
"it-protobuf-stream": "^1.0.0",
"it-pipe": "^3.0.0",
"it-protobuf-stream": "^1.0.0",
"it-stream-types": "^2.0.1",
"multiformats": "^12.0.1",
"p-defer": "^4.0.0",
Expand All @@ -153,7 +155,7 @@
"uint8arrays": "^4.0.2"
},
"devDependencies": {
"aegir": "^40.0.8",
"aegir": "^41.1.11",
"protons": "^7.0.2"
},
"peerDependencies": {
Expand Down
48 changes: 46 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,47 @@
/**
* @packageDocumentation
*
* This repository holds interop tests for testing compatibility between different libp2p implementations.
*
* @example How to run the tests
*
* Create a js file that configures the different types of daemon:
*
* ```js
* import { interopTests } from '@libp2p/interop'
* import type { Daemon, DaemonFactory } from '@libp2p/interop'
*
* async function createGoPeer (options: SpawnOptions): Promise<Daemon> {
* // your implementation here
* }
*
* async function createJsPeer (options: SpawnOptions): Promise<Daemon> {
* // your implementation here
* }
*
* async function main () {
* const factory: DaemonFactory = {
* async spawn (options: SpawnOptions) {
* if (options.type === 'go') {
* return createGoPeer(options)
* }
*
* return createJsPeer(options)
* }
* }
*
* interopTests(factory)
* }
*
* main().catch(err => {
* console.error(err)
* process.exit(1)
* })
* ```
*
* For an example, see the js-libp2p interop test runner.
*/

import { connectTests } from './connect.js'
import { dhtTests } from './dht/index.js'
import { pubsubTests } from './pubsub/index.js'
Expand All @@ -6,7 +50,7 @@ import { streamTests } from './streams/index.js'
import type { DaemonClient } from '@libp2p/daemon-client'

export interface Daemon {
stop: () => Promise<void>
stop(): Promise<void>
client: DaemonClient
}

Expand All @@ -30,7 +74,7 @@ export interface SpawnOptions {
}

export interface DaemonFactory {
spawn: (options: SpawnOptions) => Promise<Daemon>
spawn(options: SpawnOptions): Promise<Daemon>
}

export async function interopTests (factory: DaemonFactory): Promise<void> {
Expand Down
5 changes: 5 additions & 0 deletions typedoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"entryPoints": [
"./src/index.ts"
]
}

0 comments on commit 872cba5

Please sign in to comment.