mirror of
https://github.com/fluencelabs/fluence-js.git
synced 2025-03-15 07:20:49 +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
|
||||
|
||||
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
.github/workflows/snapshot.yml
vendored
26
.github/workflows/snapshot.yml
vendored
@ -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 }}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user