Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 90 additions & 0 deletions .github/workflows/fluence_js_e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Run e2e tests

on:
pull_request:
paths-ignore:
- "**.md"

concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

env:
FORCE_COLOR: true

jobs:
build:
name: "Build fluence-js"
runs-on: ubuntu-latest

permissions:
contents: read
id-token: write

outputs:
fluence-js-version: "${{ steps.build.outputs.version }}"

steps:
- uses: actions/checkout@v3

- uses: pnpm/action-setup@v2.2.2
with:
version: 7

- name: Setup node with self-hosted npm registry
uses: actions/setup-node@v2
with:
node-version: "16"
registry-url: "https://npm.fluence.dev"

- run: pnpm i
- run: pnpm -r build

- name: Import secrets
uses: hashicorp/vault-action@v2.4.2
with:
url: https://vault.fluence.dev
path: jwt/github
role: ci
method: jwt
jwtGithubAudience: "https://github.com/fluencelabs"
jwtTtl: 300
exportToken: false
secrets: |
kv/npm-registry/basicauth/ci token | NODE_AUTH_TOKEN

- name: Generate package version
id: version
run: |
BRANCH=${GITHUB_REF#refs/heads/}
SHA=$(git rev-parse --short HEAD)

echo "::set-output name=sha::$SHA"
echo "::set-output name=branch::${BRANCH//[^a-zA-Z0-9-]/-}"

- 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 }}
run: |
node ci.js bump-version ${{ env.BRANCH }}-${{ env.SHA }}-${{ env.RUN }}-${{ env.ATTEMPT }}
echo "::set-output name=version::$(node ci.js get-version)"

- name: Publish to self-hosted npm repo
run: pnpm --no-git-checks --registry https://npm.fluence.dev -r publish --tag e2e -filter '@fluencelabs/*'

aqua-playground:
permissions:
contents: read
id-token: write

needs:
- build

uses: fluencelabs/aqua-playground/.github/workflows/tests.yml@marine-e2e
with:
fluence-js-version: ${{ needs.build.outputs.fluence-js-version }}
ref: marine-e2e
1 change: 0 additions & 1 deletion .github/workflows/publish_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,3 @@ jobs:
echo ""
echo "echo '@fluencelabs:registry=https://npm.fluence.dev/' > .npmrc"
echo "npm i @fluencelabs/fluence@${fjs_version}"