diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 527c36e50..c2a279823 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -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 }} diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index 4e20840b9..b78c38c42 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -25,6 +25,7 @@ jobs: permissions: contents: read + pull-requests: write id-token: write steps: @@ -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 @@ -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 @@ -87,18 +88,7 @@ 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: @@ -106,8 +96,10 @@ jobs: 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 }}"