fix: Allow the HBar Rate Limiter to be disabled. #2183
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Image Test | |
on: | |
pull_request: | |
branches: [main, release/**] | |
env: | |
OWNER: hashgraph | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: smart-contracts-linux-medium | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0 | |
with: | |
egress-policy: audit | |
- name: Checkout repository | |
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
- name: Set up Docker Qemu | |
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0 | |
with: | |
driver-opts: network=host | |
- name: Build image | |
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0 | |
with: | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
platforms: linux/amd64 | |
push: false | |
load: true | |
tags: relay:latest | |
- name: Start server | |
run: | | |
docker run \ | |
-e CHAIN_ID='0x12a' \ | |
-e HEDERA_NETWORK='{"127.0.0.1:50211":"0.0.3"}' \ | |
-e MIRROR_NODE_URL='http://127.0.0.1:5551' \ | |
-e OPERATOR_ID_MAIN='0.0.1002' \ | |
-e OPERATOR_KEY_MAIN='302e020100300506032b65700422042077d69b53642d0000000000000000000000000000000000000000000000000000' \ | |
-d -p 7546:7546 --name relay relay:latest | |
- name: Test server | |
run: | | |
sleep 15 # Wait for the server to start | |
response=$(curl -s http://localhost:7546/health/liveness) | |
if [ "$response" = "OK" ]; then | |
echo "Server responded with 'OK'. Test passed!" | |
exit 0 | |
else | |
echo "Server responded with '$response'. Test failed!" | |
exit 1 | |
fi | |
- name: Stop server | |
if: always() | |
run: | | |
docker stop relay | |
docker rm relay |