mirror of
https://github.com/fluencelabs/fluence-js.git
synced 2024-12-05 02:10:18 +00:00
parent
baf367e88a
commit
dd7f4b69be
@ -24,58 +24,28 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
name: "fluence-js"
|
||||
name: "js-client"
|
||||
uses: ./.github/workflows/tests.yml
|
||||
with:
|
||||
ref: ${{ github.ref }}
|
||||
|
||||
fluence-js:
|
||||
js-client:
|
||||
uses: ./.github/workflows/snapshot.yml
|
||||
with:
|
||||
ref: ${{ github.ref }}
|
||||
|
||||
aqua:
|
||||
needs:
|
||||
- fluence-js
|
||||
|
||||
uses: fluencelabs/aqua/.github/workflows/snapshot.yml@main
|
||||
with:
|
||||
fluence-js-version: "${{ needs.fluence-js.outputs.fluence-js-version }}"
|
||||
|
||||
aqua-playground:
|
||||
needs:
|
||||
- fluence-js
|
||||
- aqua
|
||||
- js-client
|
||||
|
||||
uses: fluencelabs/aqua-playground/.github/workflows/tests.yml@master
|
||||
uses: fluencelabs/aqua-playground/.github/workflows/tests.yml@FLU-274
|
||||
with:
|
||||
fluence-js-version: "${{ needs.fluence-js.outputs.fluence-js-version }}"
|
||||
aqua-version: "${{ needs.aqua.outputs.aqua-version }}"
|
||||
|
||||
registry:
|
||||
needs:
|
||||
- aqua
|
||||
|
||||
uses: fluencelabs/registry/.github/workflows/tests.yml@main
|
||||
with:
|
||||
aqua-version: "${{ needs.aqua.outputs.aqua-version }}"
|
||||
|
||||
fluence-cli:
|
||||
needs:
|
||||
- fluence-js
|
||||
- aqua
|
||||
|
||||
uses: fluencelabs/fluence-cli/.github/workflows/tests.yml@main
|
||||
with:
|
||||
aqua-version: "${{ needs.aqua.outputs.aqua-version }}"
|
||||
fluence-js-version: "${{ needs.fluence-js.outputs.fluence-js-version }}"
|
||||
js-client-snapshots: "${{ needs.js-client.outputs.js-client-snapshots }}"
|
||||
|
||||
status:
|
||||
runs-on: ubuntu-latest
|
||||
if: always()
|
||||
needs:
|
||||
- fluence-cli
|
||||
- registry
|
||||
- aqua-playground
|
||||
|
||||
steps:
|
94
.github/workflows/run-tests.yml
vendored
94
.github/workflows/run-tests.yml
vendored
@ -1,94 +0,0 @@
|
||||
name: "ci"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- "**.md"
|
||||
- ".github/**"
|
||||
- "!.github/workflows/e2e.yml"
|
||||
- "!.github/workflows/tests.yml"
|
||||
- "!.github/workflows/snapshot.yml"
|
||||
push:
|
||||
branches:
|
||||
- "master"
|
||||
paths-ignore:
|
||||
- "**.md"
|
||||
- ".github/**"
|
||||
- "!.github/workflows/e2e.yml"
|
||||
- "!.github/workflows/tests.yml"
|
||||
- "!.github/workflows/snapshot.yml"
|
||||
|
||||
concurrency:
|
||||
group: "${{ github.workflow }}-${{ github.ref }}"
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
RUST_PEER_IMAGE: "fluencelabs/fluence:minimal"
|
||||
FORCE_COLOR: true
|
||||
CI: true
|
||||
|
||||
jobs:
|
||||
fluence-js:
|
||||
name: "Run tests"
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version:
|
||||
- 16.x
|
||||
- 17.x
|
||||
- 18.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
|
||||
|
||||
- name: Pull rust-peer image
|
||||
run: docker pull $RUST_PEER_IMAGE
|
||||
|
||||
- name: Run rust-peer
|
||||
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: 7
|
||||
|
||||
- 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"
|
||||
|
||||
- run: pnpm i
|
||||
|
||||
- run: pnpm -r build
|
||||
- run: pnpm -r test
|
104
.github/workflows/snapshot.yml
vendored
104
.github/workflows/snapshot.yml
vendored
@ -14,11 +14,11 @@ on:
|
||||
ref:
|
||||
description: "git ref to checkout to"
|
||||
type: string
|
||||
default: "v0.28.0"
|
||||
default: "master"
|
||||
outputs:
|
||||
fluence-js-version:
|
||||
description: "@fluencelabs/fluence version"
|
||||
value: ${{ jobs.publish-snapshot.outputs.fluence-js-version }}
|
||||
js-client-snapshots:
|
||||
description: "js-client snapshots"
|
||||
value: ${{ jobs.publish-snapshot.outputs.snapshots }}
|
||||
|
||||
env:
|
||||
FORCE_COLOR: true
|
||||
@ -30,7 +30,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
outputs:
|
||||
fluence-js-version: "${{ steps.snapshot.outputs.version }}"
|
||||
snapshots: "${{ steps.snapshot.outputs.snapshots }}"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@ -56,22 +56,100 @@ jobs:
|
||||
|
||||
- run: pnpm i
|
||||
|
||||
- name: Set avm version
|
||||
- name: Set avm version in core/interfaces
|
||||
if: inputs.avm-version != 'null'
|
||||
uses: fluencelabs/github-actions/npm-set-dependency@main
|
||||
with:
|
||||
package: "@fluencelabs/avm"
|
||||
version: ${{ inputs.avm-version }}
|
||||
working-directory: packages/fluence-js
|
||||
working-directory: packages/core/interfaces
|
||||
package-manager: pnpm
|
||||
flags: "--save --dev"
|
||||
|
||||
- name: Set marine-js version
|
||||
- name: Set marine-js version in core/interfaces
|
||||
if: inputs.marine-js-version != 'null'
|
||||
uses: fluencelabs/github-actions/npm-set-dependency@main
|
||||
with:
|
||||
package: "@fluencelabs/marine-js"
|
||||
version: ${{ inputs.marine-js-version }}
|
||||
working-directory: packages/fluence-js
|
||||
working-directory: packages/core/interfaces
|
||||
package-manager: pnpm
|
||||
flags: "--save --dev"
|
||||
|
||||
- name: Set avm version in core/js-peer
|
||||
if: inputs.avm-version != 'null'
|
||||
uses: fluencelabs/github-actions/npm-set-dependency@main
|
||||
with:
|
||||
package: "@fluencelabs/avm"
|
||||
version: ${{ inputs.avm-version }}
|
||||
working-directory: packages/core/js-peer
|
||||
package-manager: pnpm
|
||||
|
||||
- name: Set marine-js version in core/js-peer
|
||||
if: inputs.marine-js-version != 'null'
|
||||
uses: fluencelabs/github-actions/npm-set-dependency@main
|
||||
with:
|
||||
package: "@fluencelabs/marine-js"
|
||||
version: ${{ inputs.marine-js-version }}
|
||||
working-directory: packages/core/js-peer
|
||||
package-manager: pnpm
|
||||
|
||||
- name: Set avm version in client/api
|
||||
if: inputs.avm-version != 'null'
|
||||
uses: fluencelabs/github-actions/npm-set-dependency@main
|
||||
with:
|
||||
package: "@fluencelabs/avm"
|
||||
version: ${{ inputs.avm-version }}
|
||||
working-directory: packages/client/api
|
||||
package-manager: pnpm
|
||||
flags: "--save --dev"
|
||||
|
||||
- name: Set marine-js version in client/api
|
||||
if: inputs.marine-js-version != 'null'
|
||||
uses: fluencelabs/github-actions/npm-set-dependency@main
|
||||
with:
|
||||
package: "@fluencelabs/marine-js"
|
||||
version: ${{ inputs.marine-js-version }}
|
||||
working-directory: packages/client/api
|
||||
package-manager: pnpm
|
||||
flags: "--save --dev"
|
||||
|
||||
- name: Set avm version in client/js-client.web
|
||||
if: inputs.avm-version != 'null'
|
||||
uses: fluencelabs/github-actions/npm-set-dependency@main
|
||||
with:
|
||||
package: "@fluencelabs/avm"
|
||||
version: ${{ inputs.avm-version }}
|
||||
working-directory: packages/client/js-client.web.standalone
|
||||
package-manager: pnpm
|
||||
flags: "--save --dev"
|
||||
|
||||
- name: Set marine-js version in client/js-client.web
|
||||
if: inputs.marine-js-version != 'null'
|
||||
uses: fluencelabs/github-actions/npm-set-dependency@main
|
||||
with:
|
||||
package: "@fluencelabs/marine-js"
|
||||
version: ${{ inputs.marine-js-version }}
|
||||
working-directory: packages/client/js-client.web.standalone
|
||||
package-manager: pnpm
|
||||
flags: "--save --dev"
|
||||
|
||||
- name: Set avm version in client/js-client.node
|
||||
if: inputs.avm-version != 'null'
|
||||
uses: fluencelabs/github-actions/npm-set-dependency@main
|
||||
with:
|
||||
package: "@fluencelabs/avm"
|
||||
version: ${{ inputs.avm-version }}
|
||||
working-directory: packages/client/js-client.node
|
||||
package-manager: pnpm
|
||||
|
||||
- name: Set marine-js version in client/js-client.node
|
||||
if: inputs.marine-js-version != 'null'
|
||||
uses: fluencelabs/github-actions/npm-set-dependency@main
|
||||
with:
|
||||
package: "@fluencelabs/marine-js"
|
||||
version: ${{ inputs.marine-js-version }}
|
||||
working-directory: packages/client/js-client.node
|
||||
package-manager: pnpm
|
||||
|
||||
- name: Import secrets
|
||||
@ -92,15 +170,13 @@ jobs:
|
||||
uses: fluencelabs/github-actions/generate-snapshot-id@main
|
||||
|
||||
- name: Set package version
|
||||
run: node ci.js bump-version ${{ steps.version.outputs.id }}
|
||||
run: node ci.cjs bump-version ${{ steps.version.outputs.id }}
|
||||
|
||||
- run: pnpm -r build
|
||||
|
||||
- name: Publish snapshots
|
||||
id: snapshot
|
||||
uses: fluencelabs/github-actions/npm-publish-snapshot@main
|
||||
uses: fluencelabs/github-actions/pnpm-publish-snapshot@main
|
||||
with:
|
||||
working-directory: packages/fluence-js
|
||||
id: ${{ steps.version.outputs.id }}
|
||||
package-manager: pnpm
|
||||
flags: "-r --registry https://npm.fluence.dev --no-git-checks --tag snapsot -filter '@fluencelabs/*'"
|
||||
flags: "-r --registry https://npm.fluence.dev --no-git-checks --tag snapshot -filter '@fluencelabs/*'"
|
||||
|
86
.github/workflows/tests.yml
vendored
86
.github/workflows/tests.yml
vendored
@ -90,22 +90,100 @@ jobs:
|
||||
|
||||
- run: pnpm i
|
||||
|
||||
- name: Set avm version
|
||||
- name: Set avm version in core/interfaces
|
||||
if: inputs.avm-version != 'null'
|
||||
uses: fluencelabs/github-actions/npm-set-dependency@main
|
||||
with:
|
||||
package: "@fluencelabs/avm"
|
||||
version: ${{ inputs.avm-version }}
|
||||
working-directory: packages/fluence-js
|
||||
working-directory: packages/core/interfaces
|
||||
package-manager: pnpm
|
||||
flags: "--save --dev"
|
||||
|
||||
- name: Set marine-js version
|
||||
- name: Set marine-js version in core/interfaces
|
||||
if: inputs.marine-js-version != 'null'
|
||||
uses: fluencelabs/github-actions/npm-set-dependency@main
|
||||
with:
|
||||
package: "@fluencelabs/marine-js"
|
||||
version: ${{ inputs.marine-js-version }}
|
||||
working-directory: packages/fluence-js
|
||||
working-directory: packages/core/interfaces
|
||||
package-manager: pnpm
|
||||
flags: "--save --dev"
|
||||
|
||||
- name: Set avm version in core/js-peer
|
||||
if: inputs.avm-version != 'null'
|
||||
uses: fluencelabs/github-actions/npm-set-dependency@main
|
||||
with:
|
||||
package: "@fluencelabs/avm"
|
||||
version: ${{ inputs.avm-version }}
|
||||
working-directory: packages/core/js-peer
|
||||
package-manager: pnpm
|
||||
|
||||
- name: Set marine-js version in core/js-peer
|
||||
if: inputs.marine-js-version != 'null'
|
||||
uses: fluencelabs/github-actions/npm-set-dependency@main
|
||||
with:
|
||||
package: "@fluencelabs/marine-js"
|
||||
version: ${{ inputs.marine-js-version }}
|
||||
working-directory: packages/core/js-peer
|
||||
package-manager: pnpm
|
||||
|
||||
- name: Set avm version in client/api
|
||||
if: inputs.avm-version != 'null'
|
||||
uses: fluencelabs/github-actions/npm-set-dependency@main
|
||||
with:
|
||||
package: "@fluencelabs/avm"
|
||||
version: ${{ inputs.avm-version }}
|
||||
working-directory: packages/client/api
|
||||
package-manager: pnpm
|
||||
flags: "--save --dev"
|
||||
|
||||
- name: Set marine-js version in client/api
|
||||
if: inputs.marine-js-version != 'null'
|
||||
uses: fluencelabs/github-actions/npm-set-dependency@main
|
||||
with:
|
||||
package: "@fluencelabs/marine-js"
|
||||
version: ${{ inputs.marine-js-version }}
|
||||
working-directory: packages/client/api
|
||||
package-manager: pnpm
|
||||
flags: "--save --dev"
|
||||
|
||||
- name: Set avm version in client/js-client.web
|
||||
if: inputs.avm-version != 'null'
|
||||
uses: fluencelabs/github-actions/npm-set-dependency@main
|
||||
with:
|
||||
package: "@fluencelabs/avm"
|
||||
version: ${{ inputs.avm-version }}
|
||||
working-directory: packages/client/js-client.web.standalone
|
||||
package-manager: pnpm
|
||||
flags: "--save --dev"
|
||||
|
||||
- name: Set marine-js version in client/js-client.web
|
||||
if: inputs.marine-js-version != 'null'
|
||||
uses: fluencelabs/github-actions/npm-set-dependency@main
|
||||
with:
|
||||
package: "@fluencelabs/marine-js"
|
||||
version: ${{ inputs.marine-js-version }}
|
||||
working-directory: packages/client/js-client.web.standalone
|
||||
package-manager: pnpm
|
||||
flags: "--save --dev"
|
||||
|
||||
- name: Set avm version in client/js-client.node
|
||||
if: inputs.avm-version != 'null'
|
||||
uses: fluencelabs/github-actions/npm-set-dependency@main
|
||||
with:
|
||||
package: "@fluencelabs/avm"
|
||||
version: ${{ inputs.avm-version }}
|
||||
working-directory: packages/client/js-client.node
|
||||
package-manager: pnpm
|
||||
|
||||
- name: Set marine-js version in client/js-client.node
|
||||
if: inputs.marine-js-version != 'null'
|
||||
uses: fluencelabs/github-actions/npm-set-dependency@main
|
||||
with:
|
||||
package: "@fluencelabs/marine-js"
|
||||
version: ${{ inputs.marine-js-version }}
|
||||
working-directory: packages/client/js-client.node
|
||||
package-manager: pnpm
|
||||
|
||||
- run: pnpm -r build
|
||||
|
@ -43,7 +43,7 @@ async function getPackageJsonsRecursive(currentPath) {
|
||||
(await fs.readdir(currentPath, { withFileTypes: true }))
|
||||
.filter(
|
||||
(file) =>
|
||||
file.name !== "node_modules" &&
|
||||
file.name !== "node_modules" && file.name !== "@tests" &&
|
||||
(file.isDirectory() || file.name === "package.json")
|
||||
)
|
||||
.map((file) =>
|
44
package.json
44
package.json
@ -1,24 +1,24 @@
|
||||
{
|
||||
"name": "common-dev-deps",
|
||||
"version": "0.1.0",
|
||||
"main": "./dist/index.js",
|
||||
"typings": "./dist/index.d.ts",
|
||||
"type": "module",
|
||||
"engines": {
|
||||
"node": ">=10",
|
||||
"pnpm": ">=3"
|
||||
},
|
||||
"scripts": {
|
||||
"simulate-cdn": "http-server -p 8765 ./packages/client/js-client.web.standalone/dist"
|
||||
},
|
||||
"author": "Fluence Labs",
|
||||
"license": "Apache-2.0",
|
||||
"devDependencies": {
|
||||
"http-server": "14.1.1",
|
||||
"@types/node": "18.13.0",
|
||||
"ts-node": "10.9.1",
|
||||
"typescript": "4.7",
|
||||
"@fluencelabs/aqua-lib": "0.6.0",
|
||||
"@fluencelabs/aqua": "0.9.1-374"
|
||||
}
|
||||
"name": "common-dev-deps",
|
||||
"version": "0.1.0",
|
||||
"main": "./dist/index.js",
|
||||
"typings": "./dist/index.d.ts",
|
||||
"type": "module",
|
||||
"engines": {
|
||||
"node": ">=10",
|
||||
"pnpm": ">=3"
|
||||
},
|
||||
"scripts": {
|
||||
"simulate-cdn": "http-server -p 8765 ./packages/client/js-client.web.standalone/dist"
|
||||
},
|
||||
"author": "Fluence Labs",
|
||||
"license": "Apache-2.0",
|
||||
"devDependencies": {
|
||||
"http-server": "14.1.1",
|
||||
"@types/node": "18.13.0",
|
||||
"ts-node": "10.9.1",
|
||||
"typescript": "4.7",
|
||||
"@fluencelabs/aqua-lib": "0.6.0",
|
||||
"@fluencelabs/aqua": "0.9.1-374"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user