mirror of
https://github.com/fluencelabs/aqua.git
synced 2024-12-04 14:40:17 +00:00
ci: Update e2e (#593)
* Debug * Debug * Update * Try with push event * Cleanup * Test
This commit is contained in:
parent
2b36dbea40
commit
a51c42192f
@ -1,9 +1,12 @@
|
||||
name: Run tests
|
||||
name: "e2e"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths-ignode:
|
||||
- "**.md"
|
||||
push:
|
||||
branches:
|
||||
- "master"
|
||||
|
||||
concurrency:
|
||||
group: "${{ github.workflow }}-${{ github.ref }}"
|
||||
@ -29,18 +32,18 @@ jobs:
|
||||
- name: Run tests
|
||||
run: sbt test
|
||||
|
||||
snapshot:
|
||||
aqua:
|
||||
name: "aqua"
|
||||
uses: ./.github/workflows/snapshot.yml
|
||||
|
||||
aqua-playground:
|
||||
needs: snapshot
|
||||
uses: fluencelabs/aqua-playground/.github/workflows/tests.yml@master
|
||||
needs: aqua
|
||||
uses: fluencelabs/aqua-playground/.github/workflows/tests.yml@update-e2e
|
||||
with:
|
||||
aqua-version: "${{ needs.snapshot.outputs.aqua-version }}"
|
||||
aqua-version: "${{ needs.aqua.outputs.aqua-version }}"
|
||||
|
||||
registry:
|
||||
needs: snapshot
|
||||
needs: aqua
|
||||
uses: fluencelabs/registry/.github/workflows/tests.yml@main
|
||||
with:
|
||||
aqua-version: "${{ needs.snapshot.outputs.aqua-version }}"
|
||||
aqua-version: "${{ needs.aqua.outputs.aqua-version }}"
|
47
.github/workflows/snapshot.yml
vendored
47
.github/workflows/snapshot.yml
vendored
@ -56,11 +56,10 @@ jobs:
|
||||
needs: compile
|
||||
|
||||
outputs:
|
||||
aqua-version: "${{ steps.build.outputs.version }}"
|
||||
aqua-version: "${{ steps.snapshot.outputs.version }}"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
id-token: write
|
||||
|
||||
steps:
|
||||
@ -77,7 +76,7 @@ jobs:
|
||||
- run: mv scala-*/cli-fastopt.js npm/aqua.js
|
||||
|
||||
- name: Import secrets
|
||||
uses: hashicorp/vault-action@v2.4.2
|
||||
uses: hashicorp/vault-action@v2.4.3
|
||||
with:
|
||||
url: https://vault.fluence.dev
|
||||
path: jwt/github
|
||||
@ -108,39 +107,13 @@ jobs:
|
||||
- run: npm run build
|
||||
working-directory: npm
|
||||
|
||||
- name: Generate package version
|
||||
- name: Generate snapshot version
|
||||
id: version
|
||||
run: |
|
||||
SHA=${{ github.event.pull_request.head.sha }}
|
||||
echo "sha=${SHA::7}" >> $GITHUB_OUTPUT
|
||||
echo "branch=${GITHUB_HEAD_REF//[^a-zA-Z0-9-]/-}" >> $GITHUB_OUTPUT
|
||||
uses: fluencelabs/github-actions/generate-snapshot-id@main
|
||||
|
||||
- name: Set package version
|
||||
id: build
|
||||
env:
|
||||
BRANCH: ${{ steps.version.outputs.branch }}
|
||||
SHA: ${{ steps.version.outputs.sha }}
|
||||
RUN: ${{ github.run_number }}
|
||||
ATTEMPT: ${{ github.run_attempt }}
|
||||
working-directory: npm
|
||||
run: |
|
||||
echo "version=$(\
|
||||
npm version prerelease \
|
||||
--no-git-tag-version \
|
||||
--preid ${{ env.BRANCH }}-${{ env.SHA }}-${{ env.RUN }}-${{ env.ATTEMPT }})" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Publish to self-hosted npm repo
|
||||
working-directory: npm
|
||||
run: npm publish --tag snapshot --registry https://npm.fluence.dev
|
||||
|
||||
- name: Print versions to check summary
|
||||
env:
|
||||
VERSION: ${{ steps.build.outputs.version }}
|
||||
run: |
|
||||
cat <<'SNAPSHOT' >> $GITHUB_STEP_SUMMARY
|
||||
## aqua version is [${{ env.VERSION }}](https://npm.fluence.dev/-/web/detail/@fluencelabs/aqua/v/${{ env.VERSION }})
|
||||
To use it run:
|
||||
```shell
|
||||
npm i @fluencelabs/aqua@=${{ env.VERSION }} --registry=https://npm.fluence.dev
|
||||
```
|
||||
SNAPSHOT
|
||||
- name: Publish snapshot
|
||||
id: snapshot
|
||||
uses: fluencelabs/github-actions/npm-publish-snapshot@main
|
||||
with:
|
||||
working-directory: npm
|
||||
id: ${{ steps.version.outputs.id }}
|
||||
|
Loading…
Reference in New Issue
Block a user