Skip to content

Commit aea5efb

Browse files
nahsiAkim Mamedov
and
Akim Mamedov
authored
chore: Use fluence-cli to setup network (#441)
* Use fluence-cli to setup network * F * Ignore fluence dir * Change default relay * Fix peer ID * Add provider secrets * Cleanup * Fix * Use unstable nox * Cleanup --------- Co-authored-by: Akim Mamedov <[email protected]>
1 parent 25faa5a commit aea5efb

File tree

11 files changed

+76
-237
lines changed

11 files changed

+76
-237
lines changed

.fluence/env.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# yaml-language-server: $schema=schemas/env.json
2+
3+
# Defines user project preferences
4+
5+
# Documentation: https://github.com/fluencelabs/cli/tree/main/docs/configs/env.md
6+
7+
version: 0
8+
9+
fluenceEnv: local

.fluence/provider-secrets.yaml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# yaml-language-server: $schema=schemas/provider-secrets.json
2+
3+
# Defines secrets config used for provider set up
4+
5+
# Documentation: https://github.com/fluencelabs/cli/tree/main/docs/configs/provider-secrets.md
6+
7+
version: 0
8+
9+
noxes:
10+
nox-0:
11+
networkKey: t/7R5m9TprvbWFwr2ZKe8hm6UW84ulDq4pVbDvHUCdw=
12+
signingWallet: "0x3785b85a34b65082664bdb2ccb47fba6aab6984b7c16b36ad54145eecc368e4c"
13+
nox-1:
14+
networkKey: +5VkzeaILY+Emk9zsLKJ82dzzF3fMmlFkNhkJVwDMdo=
15+
signingWallet: "0xd9a5eee84979d0cf118f82f7c97ca6980e6a21db0c7271a3d59248841ed04d83"
16+
nox-2:
17+
networkKey: YNq7A6KlPhdyJwq7y3meTIPUVQ34HFwW21MlsDjpxsM=
18+
signingWallet: "0x16e3984df2918538c5dbba032f00a5ecd5900b9c43a36b38ed89b6be1820a9ba"

.fluence/schemas/env.json

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"$id": "https://fluence.dev/schemas/env.yaml",
3+
"title": "env.yaml",
4+
"type": "object",
5+
"description": "Defines user project preferences",
6+
"properties": {
7+
"fluenceEnv": {
8+
"title": "Fluence environment",
9+
"description": "Fluence environment to connect to",
10+
"type": "string",
11+
"enum": [
12+
"dar",
13+
"stage",
14+
"kras",
15+
"local",
16+
"custom"
17+
],
18+
"nullable": true
19+
},
20+
"version": {
21+
"type": "number",
22+
"const": 0
23+
}
24+
},
25+
"required": [
26+
"version"
27+
],
28+
"additionalProperties": false
29+
}

.github/e2e/docker-compose.yml

-208
This file was deleted.

.github/e2e/ipfs/01-configure.sh

-12
This file was deleted.

.github/workflows/e2e.yml

-2
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,10 @@ jobs:
4343
uses: fluencelabs/aqua/.github/workflows/tests.yml@main
4444
with:
4545
js-client-snapshots: "${{ needs.js-client.outputs.js-client-snapshots }}"
46-
nox-image: "docker.fluence.dev/nox:renovate-avm_4905_1"
4746
flox:
4847
needs:
4948
- js-client
5049

5150
uses: fluencelabs/flox/.github/workflows/tests.yml@main
5251
with:
5352
js-client-snapshots: "${{ needs.js-client.outputs.js-client-snapshots }}"
54-
nox-image: "docker.fluence.dev/nox:renovate-avm_4905_1"

.github/workflows/tests.yml

+11-8
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
nox-image:
77
description: "nox image tag"
88
type: string
9-
default: "fluencelabs/nox:0.4.2"
9+
default: "fluencelabs/nox:unstable"
1010
avm-version:
1111
description: "@fluencelabs/avm version"
1212
type: string
@@ -21,9 +21,9 @@ on:
2121
default: "main"
2222

2323
env:
24-
NOX_IMAGE: "${{ inputs.nox-image }}"
2524
FORCE_COLOR: true
2625
CI: true
26+
FCLI_V_NOX: "${{ inputs.nox-image }}"
2727

2828
jobs:
2929
js-client:
@@ -70,14 +70,17 @@ jobs:
7070
repository: fluencelabs/fluence-js
7171
ref: ${{ inputs.ref }}
7272

73-
- name: Pull nox image
74-
run: docker pull $NOX_IMAGE
73+
- name: Setup fcli
74+
uses: fluencelabs/setup-fluence@v1
75+
with:
76+
artifact: fcli
77+
version: unstable
78+
79+
- name: Init local env with fcli
80+
run: fluence local init --no-input
7581

7682
- name: Run nox network
77-
uses: isbang/[email protected]
78-
with:
79-
compose-file: ".github/e2e/docker-compose.yml"
80-
down-flags: "--volumes"
83+
run: fluence local up
8184

8285
- name: Setup pnpm
8386
uses: pnpm/[email protected]

.prettierignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ dist
77
build
88
public
99

10+
.fluence
11+
1012
**/CHANGELOG.md
1113
# TODO: remove after pnpm-set-deps will add \n symbol at the end of these files
1214
**/package.json
1315

1416
packages/core/js-client-isomorphic/src/versions.ts
1517
__snapshots__
16-
packages/@tests/aqua/src/_aqua/**
18+
packages/@tests/aqua/src/_aqua/**

packages/@tests/aqua/src/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ import { wasm } from "./wasmb64.js";
2626

2727
const relay = {
2828
multiaddr:
29-
"/ip4/127.0.0.1/tcp/9991/ws/p2p/12D3KooWBM3SdXWqGaawQDGQ6JprtwswEg3FWGvGhmgmMez1vRbR",
30-
peerId: "12D3KooWBM3SdXWqGaawQDGQ6JprtwswEg3FWGvGhmgmMez1vRbR",
29+
"/ip4/127.0.0.1/tcp/9991/ws/p2p/12D3KooWBbMuqJJZT7FTFN4fWg3k3ipUKx6KEy7pDy8mdorK5g5o",
30+
peerId: "12D3KooWBbMuqJJZT7FTFN4fWg3k3ipUKx6KEy7pDy8mdorK5g5o",
3131
};
3232

3333
function generateRandomUint8Array() {

packages/@tests/smoke/web/public/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { Fluence, callAquaFunction, randomStage } from "./js-client.min.js";
22

33
const relay = {
44
multiaddr:
5-
"/ip4/127.0.0.1/tcp/9991/ws/p2p/12D3KooWBM3SdXWqGaawQDGQ6JprtwswEg3FWGvGhmgmMez1vRbR",
6-
peerId: "12D3KooWBM3SdXWqGaawQDGQ6JprtwswEg3FWGvGhmgmMez1vRbR",
5+
"/ip4/127.0.0.1/tcp/9991/ws/p2p/12D3KooWBbMuqJJZT7FTFN4fWg3k3ipUKx6KEy7pDy8mdorK5g5o",
6+
peerId: "12D3KooWBbMuqJJZT7FTFN4fWg3k3ipUKx6KEy7pDy8mdorK5g5o",
77
};
88

99
const getRelayTime = () => {

packages/core/js-client/src/clientPeer/__test__/connection.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
export const nodes = [
1818
{
1919
multiaddr:
20-
"/ip4/127.0.0.1/tcp/9991/ws/p2p/12D3KooWBM3SdXWqGaawQDGQ6JprtwswEg3FWGvGhmgmMez1vRbR",
21-
peerId: "12D3KooWBM3SdXWqGaawQDGQ6JprtwswEg3FWGvGhmgmMez1vRbR",
20+
"/ip4/127.0.0.1/tcp/9991/ws/p2p/12D3KooWBbMuqJJZT7FTFN4fWg3k3ipUKx6KEy7pDy8mdorK5g5o",
21+
peerId: "12D3KooWBbMuqJJZT7FTFN4fWg3k3ipUKx6KEy7pDy8mdorK5g5o",
2222
},
2323
] as const;
2424

0 commit comments

Comments
 (0)