Skip to content

fix: Resolve transaction group signing performance bottlenecks #3829

fix: Resolve transaction group signing performance bottlenecks

fix: Resolve transaction group signing performance bottlenecks #3829

name: Test Frontend
on:
push:
branches:
- main
- release/**
pull_request:
branches:
- main
- release/**
workflow_dispatch:
defaults:
run:
shell: bash
permissions:
contents: read
concurrency:
group: pr-checks-${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build:
name: Build | Front-end
runs-on: transaction-tools-linux-medium
steps:
- name: Harden Runner
uses: step-security/harden-runner@a90bcbc6539c36a85cdfeb73f7e2f433735f215b # v2.15.0
with:
egress-policy: audit
- name: Checkout Code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 22.12.0
cache: 'npm'
cache-dependency-path: |
front-end/pnpm-lock.yaml
- name: Install pnpm
run: npm install -g pnpm@9.15.3
- name: Install front-end Dependencies
run: pnpm install --frozen-lockfile
working-directory: front-end
- name: Build Linux executable
run: pnpm run build:linux
working-directory: front-end
- name: Cache Build Artifacts
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: front-end/release/linux-unpacked
key: build-artifacts-${{ github.sha }}
test:
name: Automation | ${{ matrix.test-suite.name }}
runs-on: transaction-tools-linux-medium
needs: build
strategy:
fail-fast: false
matrix:
test-suite:
- name: Registration
command: RegistrationTests
soloRequired: false
- name: Login
command: LoginTests
soloRequired: false
- name: Settings
command: SettingsTests
soloRequired: false
- name: Transactions
command: TransactionTests
soloRequired: true
- name: Workflow
command: WorkflowTests
soloRequired: true
steps:
- name: Harden Runner
uses: step-security/harden-runner@a90bcbc6539c36a85cdfeb73f7e2f433735f215b # v2.15.0
with:
egress-policy: audit
- name: Checkout Code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 22.12.0
cache: 'npm'
cache-dependency-path: |
automation/pnpm-lock.yaml
- name: Install pnpm
run: npm install -g pnpm@9.15.3
- name: Install Docker Compose Plugin
run: |
sudo curl -fLo /usr/local/lib/docker/cli-plugins/docker-compose https://github.com/docker/compose/releases/download/v2.29.1/docker-compose-linux-x86_64
sudo chmod +x /usr/local/lib/docker/cli-plugins/docker-compose
- name: Install Automation Dependencies
run: pnpm install --frozen-lockfile
working-directory: automation
- name: Setup Kind
if: ${{ matrix.test-suite.soloRequired }}
uses: helm/kind-action@ef37e7f390d99f746eb8b610417061a60e82a6cc # v1.14.0
with:
install_only: true
node_image: kindest/node:v1.31.4@sha256:2cb39f7295fe7eafee0842b1052a599a4fb0f8bcf3f83d96c7f4864c357c6c30
version: v0.26.0
kubectl_version: v1.31.4
verbosity: 3
wait: 120s
- name: Install Solo CLI
if: ${{ matrix.test-suite.soloRequired }}
run: |
set -euo pipefail
npm install -g @hashgraph/solo
solo --version
kind --version
- name: Deploy Solo
if: ${{ matrix.test-suite.soloRequired }}
id: solo_deploy
env:
SOLO_CLUSTER_NAME: solo
SOLO_NAMESPACE: solo
SOLO_CLUSTER_SETUP_NAMESPACE: solo-cluster
SOLO_DEPLOYMENT: solo-deployment
run: |
set -euo pipefail
kind create cluster -n "${SOLO_CLUSTER_NAME}"
solo one-shot single deploy | tee solo-deploy.log
- name: Check port forwarding
if: ${{ matrix.test-suite.soloRequired }}
run: |
ps -ef | grep port-forward
env
curl -fsS http://localhost:8080/api/v1/network/nodes
curl -fsS http://localhost:8081/api/v1/network/nodes
- name: Restore Build Artifacts
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
fail-on-cache-miss: true
path: front-end/release/linux-unpacked
key: build-artifacts-${{ github.sha }}
- name: Install xvfb
run: sudo apt-get update && sudo apt-get install -y xvfb
- name: Install Runtime Shared Libraries
run: sudo apt-get install --no-install-recommends -y xorg openbox libnss3 libasound2 libatk-adaptor libgtk-3-0
- name: Run Automation
env:
EXECUTABLE_PATH: ../front-end/release/linux-unpacked/hedera-transaction-tool
PRIVATE_KEY: ${{ secrets.SOLO_PRIVATE_KEY }}
OPERATOR_KEY: ${{ secrets.OPERATOR_KEY }}
ENVIRONMENT: LOCALNET
run: xvfb-run -a npx playwright test tests/${{ matrix.test-suite.command }}
working-directory: automation
unit-test:
name: Unit Tests | ${{ matrix.test-suite.name }}
runs-on: transaction-tools-linux-medium
strategy:
fail-fast: false
matrix:
test-suite:
- name: Main Process
command: main:coverage
- name: Renderer Process
command: renderer
- name: Shared
command: shared
steps:
- name: Harden Runner
uses: step-security/harden-runner@a90bcbc6539c36a85cdfeb73f7e2f433735f215b # v2.15.0
with:
egress-policy: audit
- name: Checkout Code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 22.12.0
cache: 'npm'
cache-dependency-path: |
front-end/pnpm-lock.yaml
- name: Install pnpm
run: npm install -g pnpm@9.15.3
- name: Install front-end Dependencies
run: pnpm install --frozen-lockfile
working-directory: front-end
- name: Run Unit Tests
run: pnpm run test:${{ matrix.test-suite.command }}
working-directory: front-end
- name: Upload coverage to Codecov
uses: codecov/codecov-action@5c47607acb93fed5485fdbf7232e8a31425f672a # v5.0.2
with:
token: ${{ secrets.CODECOV_TOKEN }}