Akim c0b73fec4a
feat(js-client)!: Particle signatures [fixes DXJ-466] (#353)
* Introduce particle signatures

* Fix particle id field in particle context

* Fix types

* Fix review comments

* Remove init_peer_id from signature

* Fix typo

* Fix error msg

* Fix async promise constructor antipattern

* Refactor utils

* Move text encoder outside

* Use async/await

* Update packages/core/js-client/src/connection/RelayConnection.ts

Co-authored-by: shamsartem <shamsartem@gmail.com>

* Hide crypto implementation beside KeyPair

* Fix verify method

* Comment verify method

* Use particle signature instead of id

* remove async/await from method

* Fix type

* Update packages/core/js-client/src/particle/interfaces.ts

Co-authored-by: folex <0xdxdy@gmail.com>

* Update packages/core/js-client/src/particle/Particle.ts

Co-authored-by: folex <0xdxdy@gmail.com>

* Fix review comment

* Update pipe

* set logging

* try cache

---------

Co-authored-by: shamsartem <shamsartem@gmail.com>
Co-authored-by: folex <0xdxdy@gmail.com>
2023-10-02 19:39:13 +07:00

106 lines
2.7 KiB
YAML

name: Run tests with worflow_call
on:
workflow_call:
inputs:
nox-image:
description: "nox image tag"
type: string
default: "fluencelabs/nox:minimal_0.2.9"
avm-version:
description: "@fluencelabs/avm version"
type: string
default: "null"
marine-js-version:
description: "@fluencelabs/marine-js version"
type: string
default: "null"
ref:
description: "git ref to checkout to"
type: string
default: "master"
env:
NOX_IMAGE: "${{ inputs.nox-image }}"
FORCE_COLOR: true
CI: true
jobs:
js-client:
name: "Run tests"
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
strategy:
matrix:
node-version:
- 18.x
- 20.x
steps:
- name: Import secrets
uses: hashicorp/vault-action@v2.4.3
with:
url: https://vault.fluence.dev
path: jwt/github
role: ci
method: jwt
jwtGithubAudience: "https://github.com/fluencelabs"
jwtTtl: 300
secrets: |
kv/docker-registry/basicauth/ci username | DOCKER_USERNAME ;
kv/docker-registry/basicauth/ci password | DOCKER_PASSWORD
- name: Login to DockerHub
uses: docker/login-action@v2
with:
registry: docker.fluence.dev
username: ${{ env.DOCKER_USERNAME }}
password: ${{ env.DOCKER_PASSWORD }}
- name: Checkout
uses: actions/checkout@v3
with:
repository: fluencelabs/fluence-js
ref: ${{ inputs.ref }}
- name: Pull nox image
run: docker pull $NOX_IMAGE
- name: Run nox network
uses: isbang/compose-action@v1.4.1
with:
compose-file: ".github/e2e/docker-compose.yml"
down-flags: "--volumes"
- name: Setup pnpm
uses: pnpm/action-setup@v2.2.4
with:
version: 8
- name: Setup node ${{ matrix.node-version }} with self-hosted registry
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: "https://npm.fluence.dev"
cache: "pnpm"
- name: Override dependencies
uses: fluencelabs/github-actions/pnpm-set-dependency@main
with:
dependencies: |
{
"@fluencelabs/avm": "${{ inputs.avm-version }}",
"@fluencelabs/marine-js": "${{ inputs.marine-js-version }}"
}
- run: pnpm -r --no-frozen-lockfile i
- run: pnpm -r build
- run: pnpm -r test
- name: Dump rust-peer logs
if: always()
uses: jwalton/gh-docker-logs@v2