Skip to content
Draft
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
67 changes: 67 additions & 0 deletions .github/workflows/hoppscotch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Hoppscotch Endpoint Tests

on:
pull_request:
branches: [main, release/**]
push:
branches: [main, release/**]
tags: [v*]
workflow_dispatch:

concurrency:
group: pr-checks-${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

permissions:
contents: read

jobs:
setup-local-hedera:
name: Hoppscotch Endpoint Tests
runs-on: hiero-smart-contracts-linux-medium
permissions:
contents: write
actions: read
steps:
- name: Harden Runner
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
egress-policy: audit

- name: Install build tools
run: sudo apt-get update && sudo apt-get install -y make gcc g++

- name: Setup node
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: 22

- name: Checkout repo
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: Install packages
run: npm ci

- name: Create .env file
run: cp ./packages/server/tests/localAcceptance.env .env

- name: Install pnpm
run: npm install -g pnpm

- name: Build Typescript
run: npx lerna run build

- name: Start the hedera local node
run: npx hedera start -d

- name: Stop the local node's relay
run: docker stop json-rpc-relay

- name: Start the local relay
run: npm run start &

- name: Install Hoppscotch CLI
run: npm install -g @hoppscotch/cli

- name: Run Hoppscotch Tests
run: BASE_URL=http://127.0.0.1:7546 hopp test packages/server/tests/hoppscotch.json
75 changes: 0 additions & 75 deletions .github/workflows/postman.yml

This file was deleted.

18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,24 @@ run configuration. You should be able to just run that configuration, and it sho

- It is highly recommended to read the [Testing Guide](docs/testing-guide.md) for detailed testing strategies and best practices.

### Hoppscotch

First ensure `@hoppscotch/cli` is installed locally using `npm`, then execute `hopp`.

```shell
npm install -g @hoppscotch/cli
BASE_URL=http://localhost:7546 hopp test packages/server/tests/hoppscotch.json
```

To enable Hoppscotch test to run via helm deployment add

```
test:
enabled: true
schedule: '@daily' #How often to run the Hoppscotch test
baseUrl: "http://127.0.0.1:7546" # Relay URL to run the test against
```

### Acceptance Tests

The relay has a suite of acceptance tests that may be run to confirm E2E operation of the relay in either a `hedera-local-node` or deployed env.
Expand Down
Loading
Loading