mirror of
https://github.com/fluencelabs/fluence-js.git
synced 2025-03-15 15:30:49 +00:00
parent
c991f0908f
commit
82da491f3d
80
.github/e2e/docker-compose.yml
vendored
80
.github/e2e/docker-compose.yml
vendored
@ -1,5 +1,5 @@
|
|||||||
networks:
|
networks:
|
||||||
fluence:
|
nox:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
ipam:
|
ipam:
|
||||||
config:
|
config:
|
||||||
@ -11,7 +11,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 8545:8545
|
- 8545:8545
|
||||||
networks:
|
networks:
|
||||||
fluence:
|
nox:
|
||||||
|
|
||||||
ipfs:
|
ipfs:
|
||||||
image: ipfs/go-ipfs
|
image: ipfs/go-ipfs
|
||||||
@ -23,11 +23,11 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ./ipfs/:/container-init.d/
|
- ./ipfs/:/container-init.d/
|
||||||
networks:
|
networks:
|
||||||
fluence:
|
nox:
|
||||||
ipv4_address: 10.50.10.100
|
ipv4_address: 10.50.10.100
|
||||||
|
|
||||||
fluence-1:
|
nox-1:
|
||||||
image: ${RUST_PEER_IMAGE}
|
image: ${NOX_IMAGE}
|
||||||
ports:
|
ports:
|
||||||
- 7771:7771
|
- 7771:7771
|
||||||
- 9991:9991
|
- 9991:9991
|
||||||
@ -44,21 +44,21 @@ services:
|
|||||||
- -w=9991
|
- -w=9991
|
||||||
- -x=10.50.10.10
|
- -x=10.50.10.10
|
||||||
- --external-maddrs
|
- --external-maddrs
|
||||||
- /dns4/fluence-1/tcp/7771
|
- /dns4/nox-1/tcp/7771
|
||||||
- /dns4/fluence-1/tcp/9991/ws
|
- /dns4/nox-1/tcp/9991/ws
|
||||||
- --allow-private-ips
|
- --allow-private-ips
|
||||||
- --local
|
- --local
|
||||||
# - --bootstraps=/dns/fluence-1/tcp/7771
|
# - --bootstraps=/dns/nox-1/tcp/7771
|
||||||
# 12D3KooWBM3SdXWqGaawQDGQ6JprtwswEg3FWGvGhmgmMez1vRbR
|
# 12D3KooWBM3SdXWqGaawQDGQ6JprtwswEg3FWGvGhmgmMez1vRbR
|
||||||
- -k=hK62afickoeP2uZbmSkAYXxxqP8ozq16VRN7qfTP719EHC5V5tjrtW57BSjUr8GvsEXmJRbtejUWyPZ2rZMyQdq
|
- -k=hK62afickoeP2uZbmSkAYXxxqP8ozq16VRN7qfTP719EHC5V5tjrtW57BSjUr8GvsEXmJRbtejUWyPZ2rZMyQdq
|
||||||
depends_on:
|
depends_on:
|
||||||
- ipfs
|
- ipfs
|
||||||
networks:
|
networks:
|
||||||
fluence:
|
nox:
|
||||||
ipv4_address: 10.50.10.10
|
ipv4_address: 10.50.10.10
|
||||||
|
|
||||||
fluence-2:
|
nox-2:
|
||||||
image: ${RUST_PEER_IMAGE}
|
image: ${NOX_IMAGE}
|
||||||
ports:
|
ports:
|
||||||
- 7772:7772
|
- 7772:7772
|
||||||
- 9992:9992
|
- 9992:9992
|
||||||
@ -75,20 +75,20 @@ services:
|
|||||||
- -w=9992
|
- -w=9992
|
||||||
- -x=10.50.10.20
|
- -x=10.50.10.20
|
||||||
- --external-maddrs
|
- --external-maddrs
|
||||||
- /dns4/fluence-2/tcp/7772
|
- /dns4/nox-2/tcp/7772
|
||||||
- /dns4/fluence-2/tcp/9992/ws
|
- /dns4/nox-2/tcp/9992/ws
|
||||||
- --allow-private-ips
|
- --allow-private-ips
|
||||||
- --bootstraps=/dns/fluence-1/tcp/7771
|
- --bootstraps=/dns/nox-1/tcp/7771
|
||||||
# 12D3KooWQdpukY3p2DhDfUfDgphAqsGu5ZUrmQ4mcHSGrRag6gQK
|
# 12D3KooWQdpukY3p2DhDfUfDgphAqsGu5ZUrmQ4mcHSGrRag6gQK
|
||||||
- -k=2WijTVdhVRzyZamWjqPx4V4iNMrajegNMwNa2PmvPSZV6RRpo5M2fsPWdQr22HVRubuJhhSw8BrWiGt6FPhFAuXy
|
- -k=2WijTVdhVRzyZamWjqPx4V4iNMrajegNMwNa2PmvPSZV6RRpo5M2fsPWdQr22HVRubuJhhSw8BrWiGt6FPhFAuXy
|
||||||
depends_on:
|
depends_on:
|
||||||
- ipfs
|
- ipfs
|
||||||
networks:
|
networks:
|
||||||
fluence:
|
nox:
|
||||||
ipv4_address: 10.50.10.20
|
ipv4_address: 10.50.10.20
|
||||||
|
|
||||||
fluence-3:
|
nox-3:
|
||||||
image: ${RUST_PEER_IMAGE}
|
image: ${NOX_IMAGE}
|
||||||
ports:
|
ports:
|
||||||
- 7773:7773
|
- 7773:7773
|
||||||
- 9993:9993
|
- 9993:9993
|
||||||
@ -105,20 +105,20 @@ services:
|
|||||||
- -w=9993
|
- -w=9993
|
||||||
- -x=10.50.10.30
|
- -x=10.50.10.30
|
||||||
- --external-maddrs
|
- --external-maddrs
|
||||||
- /dns4/fluence-3/tcp/7773
|
- /dns4/nox-3/tcp/7773
|
||||||
- /dns4/fluence-3/tcp/9993/ws
|
- /dns4/nox-3/tcp/9993/ws
|
||||||
- --allow-private-ips
|
- --allow-private-ips
|
||||||
- --bootstraps=/dns/fluence-1/tcp/7771
|
- --bootstraps=/dns/nox-1/tcp/7771
|
||||||
# 12D3KooWRT8V5awYdEZm6aAV9HWweCEbhWd7df4wehqHZXAB7yMZ
|
# 12D3KooWRT8V5awYdEZm6aAV9HWweCEbhWd7df4wehqHZXAB7yMZ
|
||||||
- -k=2n2wBVanBeu2GWtvKBdrYK9DJAocgG3PrTUXMharq6TTfxqTL4sLdXL9BF23n6rsnkAY5pR9vBtx2uWYDQAiZdrX
|
- -k=2n2wBVanBeu2GWtvKBdrYK9DJAocgG3PrTUXMharq6TTfxqTL4sLdXL9BF23n6rsnkAY5pR9vBtx2uWYDQAiZdrX
|
||||||
depends_on:
|
depends_on:
|
||||||
- ipfs
|
- ipfs
|
||||||
networks:
|
networks:
|
||||||
fluence:
|
nox:
|
||||||
ipv4_address: 10.50.10.30
|
ipv4_address: 10.50.10.30
|
||||||
|
|
||||||
fluence-4:
|
nox-4:
|
||||||
image: ${RUST_PEER_IMAGE}
|
image: ${NOX_IMAGE}
|
||||||
ports:
|
ports:
|
||||||
- 7774:7774
|
- 7774:7774
|
||||||
- 9994:9994
|
- 9994:9994
|
||||||
@ -135,20 +135,20 @@ services:
|
|||||||
- -w=9994
|
- -w=9994
|
||||||
- -x=10.50.10.40
|
- -x=10.50.10.40
|
||||||
- --external-maddrs
|
- --external-maddrs
|
||||||
- /dns4/fluence-4/tcp/7774
|
- /dns4/nox-4/tcp/7774
|
||||||
- /dns4/fluence-4/tcp/9994/ws
|
- /dns4/nox-4/tcp/9994/ws
|
||||||
- --allow-private-ips
|
- --allow-private-ips
|
||||||
- --bootstraps=/dns/fluence-1/tcp/7771
|
- --bootstraps=/dns/nox-1/tcp/7771
|
||||||
# 12D3KooWBzLSu9RL7wLP6oUowzCbkCj2AGBSXkHSJKuq4wwTfwof
|
# 12D3KooWBzLSu9RL7wLP6oUowzCbkCj2AGBSXkHSJKuq4wwTfwof
|
||||||
- -k=4zp8ucAikkjB8CmkufYiFBW4QCDUCbQG7yMjviX7W8bMyN5rfChQ2Pi5QCWThrCTbAm9uq5nbFbxtFcNZq3De4dX
|
- -k=4zp8ucAikkjB8CmkufYiFBW4QCDUCbQG7yMjviX7W8bMyN5rfChQ2Pi5QCWThrCTbAm9uq5nbFbxtFcNZq3De4dX
|
||||||
depends_on:
|
depends_on:
|
||||||
- ipfs
|
- ipfs
|
||||||
networks:
|
networks:
|
||||||
fluence:
|
nox:
|
||||||
ipv4_address: 10.50.10.40
|
ipv4_address: 10.50.10.40
|
||||||
|
|
||||||
fluence-5:
|
nox-5:
|
||||||
image: ${RUST_PEER_IMAGE}
|
image: ${NOX_IMAGE}
|
||||||
ports:
|
ports:
|
||||||
- 7775:7775
|
- 7775:7775
|
||||||
- 9995:9995
|
- 9995:9995
|
||||||
@ -165,20 +165,20 @@ services:
|
|||||||
- -w=9995
|
- -w=9995
|
||||||
- -x=10.50.10.50
|
- -x=10.50.10.50
|
||||||
- --external-maddrs
|
- --external-maddrs
|
||||||
- /dns4/fluence-5/tcp/7775
|
- /dns4/nox-5/tcp/7775
|
||||||
- /dns4/fluence-5/tcp/9995/ws
|
- /dns4/nox-5/tcp/9995/ws
|
||||||
- --allow-private-ips
|
- --allow-private-ips
|
||||||
- --bootstraps=/dns/fluence-1/tcp/7771
|
- --bootstraps=/dns/nox-1/tcp/7771
|
||||||
# 12D3KooWBf6hFgrnXwHkBnwPGMysP3b1NJe5HGtAWPYfwmQ2MBiU
|
# 12D3KooWBf6hFgrnXwHkBnwPGMysP3b1NJe5HGtAWPYfwmQ2MBiU
|
||||||
- -k=3ry26rm5gkJXvdqRH4FoM3ezWq4xVVsBQF7wtKq4E4pbuaa6p1F84tNqifUS7DdfJL9hs2gcdW64Wc342vHZHMUp
|
- -k=3ry26rm5gkJXvdqRH4FoM3ezWq4xVVsBQF7wtKq4E4pbuaa6p1F84tNqifUS7DdfJL9hs2gcdW64Wc342vHZHMUp
|
||||||
depends_on:
|
depends_on:
|
||||||
- ipfs
|
- ipfs
|
||||||
networks:
|
networks:
|
||||||
fluence:
|
nox:
|
||||||
ipv4_address: 10.50.10.50
|
ipv4_address: 10.50.10.50
|
||||||
|
|
||||||
fluence-6:
|
nox-6:
|
||||||
image: ${RUST_PEER_IMAGE}
|
image: ${NOX_IMAGE}
|
||||||
ports:
|
ports:
|
||||||
- 7776:7776
|
- 7776:7776
|
||||||
- 9996:9996
|
- 9996:9996
|
||||||
@ -193,16 +193,16 @@ services:
|
|||||||
- --aqua-pool-size=2
|
- --aqua-pool-size=2
|
||||||
- -t=7776
|
- -t=7776
|
||||||
- -w=9996
|
- -w=9996
|
||||||
- --bootstraps=/dns/fluence-1/tcp/7771
|
- --bootstraps=/dns/nox-1/tcp/7771
|
||||||
- -x=10.50.10.60
|
- -x=10.50.10.60
|
||||||
- --external-maddrs
|
- --external-maddrs
|
||||||
- /dns4/fluence-6/tcp/7776
|
- /dns4/nox-6/tcp/7776
|
||||||
- /dns4/fluence-6/tcp/9996/ws
|
- /dns4/nox-6/tcp/9996/ws
|
||||||
- --allow-private-ips
|
- --allow-private-ips
|
||||||
# 12D3KooWPisGn7JhooWhggndz25WM7vQ2JmA121EV8jUDQ5xMovJ
|
# 12D3KooWPisGn7JhooWhggndz25WM7vQ2JmA121EV8jUDQ5xMovJ
|
||||||
- -k=5Qh8bB1sF28uLPwr3HTvEksCeC6mAWQvebCfcgv9y6j4qKwSzNKm2tzLUg4nACUEo2KZpBw11gNCnwaAdM7o1pEn
|
- -k=5Qh8bB1sF28uLPwr3HTvEksCeC6mAWQvebCfcgv9y6j4qKwSzNKm2tzLUg4nACUEo2KZpBw11gNCnwaAdM7o1pEn
|
||||||
depends_on:
|
depends_on:
|
||||||
- ipfs
|
- ipfs
|
||||||
networks:
|
networks:
|
||||||
fluence:
|
nox:
|
||||||
ipv4_address: 10.50.10.60
|
ipv4_address: 10.50.10.60
|
8
.github/workflows/e2e.yml
vendored
8
.github/workflows/e2e.yml
vendored
@ -36,14 +36,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
ref: ${{ github.ref }}
|
ref: ${{ github.ref }}
|
||||||
|
|
||||||
aqua-playground:
|
aqua:
|
||||||
needs:
|
needs:
|
||||||
- js-client
|
- js-client
|
||||||
|
|
||||||
uses: fluencelabs/aqua-playground/.github/workflows/tests.yml@master
|
uses: fluencelabs/aqua/.github/workflows/tests.yml@main
|
||||||
with:
|
with:
|
||||||
js-client-snapshots: "${{ needs.js-client.outputs.js-client-snapshots }}"
|
js-client-snapshots: "${{ needs.js-client.outputs.js-client-snapshots }}"
|
||||||
rust-peer-image: "fluencelabs/nox:unstable_minimal"
|
|
||||||
|
|
||||||
fluence-cli:
|
fluence-cli:
|
||||||
needs:
|
needs:
|
||||||
@ -51,5 +50,4 @@ jobs:
|
|||||||
|
|
||||||
uses: fluencelabs/fluence-cli/.github/workflows/tests.yml@main
|
uses: fluencelabs/fluence-cli/.github/workflows/tests.yml@main
|
||||||
with:
|
with:
|
||||||
js-client-snapshots: "${{ needs.js-client.outputs.js-client-snapshots }}"
|
js-client-snapshots: "${{ needs.js-client.outputs.js-client-snapshots }}"
|
||||||
rust-peer-image: "fluencelabs/nox:unstable_minimal"
|
|
6
.github/workflows/snapshot.yml
vendored
6
.github/workflows/snapshot.yml
vendored
@ -37,10 +37,10 @@ jobs:
|
|||||||
id-token: write
|
id-token: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout fluence-js
|
- name: Checkout js-client
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
repository: fluencelabs/fluence-js
|
repository: fluencelabs/js-client
|
||||||
ref: ${{ inputs.ref }}
|
ref: ${{ inputs.ref }}
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v2.2.4
|
- uses: pnpm/action-setup@v2.2.4
|
||||||
@ -92,4 +92,4 @@ jobs:
|
|||||||
uses: fluencelabs/github-actions/pnpm-publish-snapshot@main
|
uses: fluencelabs/github-actions/pnpm-publish-snapshot@main
|
||||||
with:
|
with:
|
||||||
id: ${{ steps.version.outputs.id }}
|
id: ${{ steps.version.outputs.id }}
|
||||||
set-version: false
|
set-version: false
|
23
.github/workflows/tests.yml
vendored
23
.github/workflows/tests.yml
vendored
@ -3,10 +3,10 @@ name: Run tests with worflow_call
|
|||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
rust-peer-image:
|
nox-image:
|
||||||
description: "rust-peer image tag"
|
description: "nox image tag"
|
||||||
type: string
|
type: string
|
||||||
default: "fluencelabs/nox:unstable_ipfs"
|
default: "fluencelabs/nox:unstable_minimal"
|
||||||
avm-version:
|
avm-version:
|
||||||
description: "@fluencelabs/avm version"
|
description: "@fluencelabs/avm version"
|
||||||
type: string
|
type: string
|
||||||
@ -21,13 +21,12 @@ on:
|
|||||||
default: "master"
|
default: "master"
|
||||||
|
|
||||||
env:
|
env:
|
||||||
RUST_PEER_IMAGE: "${{ inputs.rust-peer-image }}"
|
NOX_IMAGE: "${{ inputs.nox-image }}"
|
||||||
FORCE_COLOR: true
|
FORCE_COLOR: true
|
||||||
CI: true
|
CI: true
|
||||||
# DEBUG: '*'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
fluence-js:
|
js-client:
|
||||||
name: "Run tests"
|
name: "Run tests"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
@ -62,20 +61,16 @@ jobs:
|
|||||||
username: ${{ env.DOCKER_USERNAME }}
|
username: ${{ env.DOCKER_USERNAME }}
|
||||||
password: ${{ env.DOCKER_PASSWORD }}
|
password: ${{ env.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
- name: Setup tmate session
|
|
||||||
if: failure()
|
|
||||||
uses: mxschmitt/action-tmate@v3
|
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
repository: fluencelabs/fluence-js
|
repository: fluencelabs/fluence-js
|
||||||
ref: ${{ inputs.ref }}
|
ref: ${{ inputs.ref }}
|
||||||
|
|
||||||
- name: Pull rust-peer image
|
- name: Pull nox image
|
||||||
run: docker pull $RUST_PEER_IMAGE
|
run: docker pull $NOX_IMAGE
|
||||||
|
|
||||||
- name: Run rust-peer
|
- name: Run nox network
|
||||||
uses: isbang/compose-action@v1.4.1
|
uses: isbang/compose-action@v1.4.1
|
||||||
with:
|
with:
|
||||||
compose-file: ".github/e2e/docker-compose.yml"
|
compose-file: ".github/e2e/docker-compose.yml"
|
||||||
@ -110,4 +105,4 @@ jobs:
|
|||||||
|
|
||||||
- name: Dump rust-peer logs
|
- name: Dump rust-peer logs
|
||||||
if: always()
|
if: always()
|
||||||
uses: jwalton/gh-docker-logs@v2
|
uses: jwalton/gh-docker-logs@v2
|
@ -82,12 +82,12 @@ If you are using TypeScript:
|
|||||||
|
|
||||||
## Usage in an Application
|
## Usage in an Application
|
||||||
|
|
||||||
Once you've added the client, you can compile [Aqua](https://github.com/fluencelabs/aqua) and run it in your application. To compile Aqua, use [Fluence CLI](https://github.com/fluencelabs/fluence-cli).
|
Once you've added the client, you can compile [Aqua](https://github.com/fluencelabs/aqua) and run it in your application. To compile Aqua, use [flox](https://github.com/fluencelabs/flox).
|
||||||
|
|
||||||
1. Install the package:
|
1. Install the package:
|
||||||
|
|
||||||
```
|
```
|
||||||
npm i -D "@fluencelabs/fluence-cli"
|
npm i -D "@fluencelabs/flox"
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Add a directory in your project for Aqua code, e.g., `_aqua`.
|
2. Add a directory in your project for Aqua code, e.g., `_aqua`.
|
||||||
@ -210,4 +210,3 @@ Any interested person is welcome to contribute to the project. Please, make sure
|
|||||||
## License
|
## License
|
||||||
|
|
||||||
All software code is copyright (c) Fluence Labs, Inc. under the [Apache-2.0](./LICENSE) license.
|
All software code is copyright (c) Fluence Labs, Inc. under the [Apache-2.0](./LICENSE) license.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user