mirror of
https://github.com/fluencelabs/fluence-js.git
synced 2025-04-02 07:21:03 +00:00
chore: Small E2E tuning (#184)
* Make comment a step instead of a job To save space on summary screen of github actions * Build aqua with fluence-js snapshot * Typo * Another typo * Use short sha from branch * Fix permissions? * Fix * Install then set version * Better names * Even better names
This commit is contained in:
parent
73bce39621
commit
3b05852a65
16
.github/workflows/run-tests.yml
vendored
16
.github/workflows/run-tests.yml
vendored
@ -14,10 +14,24 @@ jobs:
|
|||||||
uses: ./.github/workflows/tests.yml
|
uses: ./.github/workflows/tests.yml
|
||||||
|
|
||||||
snapshot:
|
snapshot:
|
||||||
|
name: "fluence-js"
|
||||||
uses: ./.github/workflows/snapshot.yml
|
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:
|
aqua-playground:
|
||||||
needs: snapshot
|
needs:
|
||||||
|
- snapshot
|
||||||
|
- aqua-snapshot
|
||||||
|
|
||||||
uses: fluencelabs/aqua-playground/.github/workflows/tests.yml@master
|
uses: fluencelabs/aqua-playground/.github/workflows/tests.yml@master
|
||||||
with:
|
with:
|
||||||
fluence-js-version: ${{ needs.snapshot.outputs.fluence-js-version }}
|
fluence-js-version: ${{ needs.snapshot.outputs.fluence-js-version }}
|
||||||
|
aqua-version: ${{ needs.aqua-snapshot.outputs.aqua-version }}
|
||||||
|
26
.github/workflows/snapshot.yml
vendored
26
.github/workflows/snapshot.yml
vendored
@ -25,6 +25,7 @@ jobs:
|
|||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
pull-requests: write
|
||||||
id-token: write
|
id-token: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@ -44,12 +45,13 @@ jobs:
|
|||||||
registry-url: "https://npm.fluence.dev"
|
registry-url: "https://npm.fluence.dev"
|
||||||
cache: "pnpm"
|
cache: "pnpm"
|
||||||
|
|
||||||
|
- run: pnpm i
|
||||||
|
|
||||||
- name: Set avm version from branch
|
- name: Set avm version from branch
|
||||||
if: inputs.avm-version != ''
|
if: inputs.avm-version != ''
|
||||||
working-directory: packages/fluence-js
|
working-directory: packages/fluence-js
|
||||||
run: pnpm add @fluencelabs/avm@${{ inputs.avm-version }}
|
run: pnpm add @fluencelabs/avm@${{ inputs.avm-version }}
|
||||||
|
|
||||||
- run: pnpm i
|
|
||||||
- run: pnpm -r build
|
- run: pnpm -r build
|
||||||
|
|
||||||
- name: Import secrets
|
- name: Import secrets
|
||||||
@ -68,9 +70,8 @@ jobs:
|
|||||||
- name: Generate package version
|
- name: Generate package version
|
||||||
id: version
|
id: version
|
||||||
run: |
|
run: |
|
||||||
SHA=$(git rev-parse --short HEAD)
|
SHA=${{ github.event.pull_request.head.sha }}
|
||||||
|
echo "::set-output name=sha::${SHA::7}"
|
||||||
echo "::set-output name=sha::$SHA"
|
|
||||||
echo "::set-output name=branch::${GITHUB_HEAD_REF//[^a-zA-Z0-9-]/-}"
|
echo "::set-output name=branch::${GITHUB_HEAD_REF//[^a-zA-Z0-9-]/-}"
|
||||||
|
|
||||||
- name: Set package version
|
- name: Set package version
|
||||||
@ -87,18 +88,7 @@ jobs:
|
|||||||
- name: Publish to self-hosted npm repo
|
- name: Publish to self-hosted npm repo
|
||||||
run: pnpm --no-git-checks --registry https://npm.fluence.dev -r publish --tag e2e -filter '@fluencelabs/*'
|
run: pnpm --no-git-checks --registry https://npm.fluence.dev -r publish --tag e2e -filter '@fluencelabs/*'
|
||||||
|
|
||||||
comment:
|
- name: Find comment in PR
|
||||||
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
|
|
||||||
uses: peter-evans/find-comment@v1
|
uses: peter-evans/find-comment@v1
|
||||||
id: comment
|
id: comment
|
||||||
with:
|
with:
|
||||||
@ -106,8 +96,10 @@ jobs:
|
|||||||
comment-author: github-actions[bot]
|
comment-author: github-actions[bot]
|
||||||
body-includes: "## FluenceJS version is"
|
body-includes: "## FluenceJS version is"
|
||||||
|
|
||||||
- name: Update comment
|
- name: Update comment in PR
|
||||||
uses: peter-evans/create-or-update-comment@v1
|
uses: peter-evans/create-or-update-comment@v1
|
||||||
|
env:
|
||||||
|
FLUENCE_JS_VERSION: ${{ steps.build.outputs.version }}
|
||||||
with:
|
with:
|
||||||
comment-id: "${{ steps.comment.outputs.comment-id }}"
|
comment-id: "${{ steps.comment.outputs.comment-id }}"
|
||||||
issue-number: "${{ github.event.pull_request.number }}"
|
issue-number: "${{ github.event.pull_request.number }}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user