mirror of
https://github.com/fluencelabs/aqua.git
synced 2024-12-04 22:50:18 +00:00
chore: Small E2E tuning (#557)
* Make comment job a step * Use short sha from branch * Install then set version * Better names
This commit is contained in:
parent
f335e1ab3f
commit
33db5c51bf
32
.github/workflows/snapshot.yml
vendored
32
.github/workflows/snapshot.yml
vendored
@ -16,7 +16,7 @@ env:
|
||||
|
||||
jobs:
|
||||
compile:
|
||||
name: "Compile aqua"
|
||||
name: "Compile"
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
@ -41,7 +41,7 @@ jobs:
|
||||
path: cli/.js/target/scala-*/cli-fastopt.js
|
||||
|
||||
publish-snapshot:
|
||||
name: "Publish aqua snapshot"
|
||||
name: "Publish snapshot"
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
needs: compile
|
||||
@ -51,6 +51,7 @@ jobs:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
id-token: write
|
||||
|
||||
steps:
|
||||
@ -87,22 +88,22 @@ jobs:
|
||||
cache-dependency-path: "npm/package-lock.json"
|
||||
cache: "npm"
|
||||
|
||||
- run: npm i
|
||||
working-directory: npm
|
||||
|
||||
- name: Set fluence-js version from branch
|
||||
if: inputs.fluence-js-version != ''
|
||||
working-directory: npm
|
||||
run: npm i @fluencelabs/fluence@${{ inputs.fluence-js-version }}
|
||||
|
||||
- run: npm i
|
||||
working-directory: npm
|
||||
|
||||
- run: npm run build
|
||||
working-directory: npm
|
||||
|
||||
- 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
|
||||
@ -123,18 +124,7 @@ jobs:
|
||||
working-directory: npm
|
||||
run: npm publish --tag snapshot --registry https://npm.fluence.dev
|
||||
|
||||
comment:
|
||||
name: "Update comment"
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
needs:
|
||||
- publish-snapshot
|
||||
|
||||
env:
|
||||
AQUA_VERSION: ${{ needs.publish-snapshot.outputs.aqua-version }}
|
||||
|
||||
steps:
|
||||
- name: Find comment
|
||||
- name: Find comment in PR
|
||||
uses: peter-evans/find-comment@v1
|
||||
id: comment
|
||||
with:
|
||||
@ -142,8 +132,10 @@ jobs:
|
||||
comment-author: github-actions[bot]
|
||||
body-includes: "## Aqua version is"
|
||||
|
||||
- name: Update comment
|
||||
- name: Update comment in PR
|
||||
uses: peter-evans/create-or-update-comment@v1
|
||||
env:
|
||||
AQUA_VERSION: ${{ steps.build.outputs.version }}
|
||||
with:
|
||||
comment-id: "${{ steps.comment.outputs.comment-id }}"
|
||||
issue-number: "${{ github.event.pull_request.number }}"
|
||||
|
1
.github/workflows/tests.yml
vendored
1
.github/workflows/tests.yml
vendored
@ -30,6 +30,7 @@ jobs:
|
||||
run: sbt test
|
||||
|
||||
snapshot:
|
||||
name: "aqua"
|
||||
uses: ./.github/workflows/snapshot.yml
|
||||
|
||||
aqua-playground:
|
||||
|
Loading…
Reference in New Issue
Block a user