Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,24 @@ jobs:
uses: ./.github/workflows/tests.yml

snapshot:
name: "fluence-js"
uses: ./.github/workflows/snapshot.yml

aqua-snapshot:
name: "aqua"
needs:
- snapshot

uses: fluencelabs/aqua/.github/workflows/snapshot.yml@main
with:
fluence-js-version: ${{ needs.snapshot.outputs.fluence-js-version }}

aqua-playground:
needs: snapshot
needs:
- snapshot
- aqua-snapshot

uses: fluencelabs/aqua-playground/.github/workflows/tests.yml@master
with:
fluence-js-version: ${{ needs.snapshot.outputs.fluence-js-version }}
aqua-version: ${{ needs.aqua-snapshot.outputs.aqua-version }}
26 changes: 9 additions & 17 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:

permissions:
contents: read
pull-requests: write
id-token: write

steps:
Expand All @@ -44,12 +45,13 @@ jobs:
registry-url: "https://npm.fluence.dev"
cache: "pnpm"

- run: pnpm i

- name: Set avm version from branch
if: inputs.avm-version != ''
working-directory: packages/fluence-js
run: pnpm add @fluencelabs/avm@${{ inputs.avm-version }}

- run: pnpm i
- run: pnpm -r build

- name: Import secrets
Expand All @@ -68,9 +70,8 @@ jobs:
- name: Generate package version
id: version
run: |
SHA=$(git rev-parse --short HEAD)

echo "::set-output name=sha::$SHA"
SHA=${{ github.event.pull_request.head.sha }}
echo "::set-output name=sha::${SHA::7}"
echo "::set-output name=branch::${GITHUB_HEAD_REF//[^a-zA-Z0-9-]/-}"

- name: Set package version
Expand All @@ -87,27 +88,18 @@ jobs:
- name: Publish to self-hosted npm repo
run: pnpm --no-git-checks --registry https://npm.fluence.dev -r publish --tag e2e -filter '@fluencelabs/*'

comment:
name: "Update comment"
runs-on: ubuntu-latest

needs:
- publish-snapshot

env:
FLUENCE_JS_VERSION: ${{ needs.publish-snapshot.outputs.fluence-js-version }}

steps:
- name: Find comment
- name: Find comment in PR
uses: peter-evans/find-comment@v1
id: comment
with:
issue-number: "${{ github.event.pull_request.number }}"
comment-author: github-actions[bot]
body-includes: "## FluenceJS version is"

- name: Update comment
- name: Update comment in PR
uses: peter-evans/create-or-update-comment@v1
env:
FLUENCE_JS_VERSION: ${{ steps.build.outputs.version }}
with:
comment-id: "${{ steps.comment.outputs.comment-id }}"
issue-number: "${{ github.event.pull_request.number }}"
Expand Down