Skip to content

Commit

Permalink
ci: added CI workflow for ERC registry tool (#1168)
Browse files Browse the repository at this point in the history
* ci: added CI workflow for ERC registry tool

Signed-off-by: Logan Nguyen <[email protected]>

* Update erc-registry-test.yml

Signed-off-by: Logan Nguyen <[email protected]>

Revert "Update erc-registry-test.yml"

This reverts commit e99bec8.

Reapply "Update erc-registry-test.yml"

This reverts commit f6fab40ff567c86f177c22864cde7b3dc135b27a.

* fix: renamed workflow

Signed-off-by: Logan Nguyen <[email protected]>

Co-authored-by: Luis Mastrangelo <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>

---------

Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Co-authored-by: Luis Mastrangelo <[email protected]>
  • Loading branch information
quiet-node and acuarica authored Jan 14, 2025
1 parent 49e3ba1 commit ca30825
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/erc-registry-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: ERC Registry Tool Test

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

jobs:
run-test:
name: ERC Registry Tool
runs-on: smart-contracts-linux-large
env:
INDEXER_PATH: ./tools/erc-repository-indexer/erc-contract-indexer
steps:
- name: Harden Runner
uses: step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350 # v2.10.3
with:
egress-policy: audit

- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: recursive

- name: Use Node.js [20]
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 20

- name: Create .env file
run: cp ${{env.INDEXER_PATH}}/local.env ${{env.INDEXER_PATH}}/.env

- name: Install Dependencies
run: |
npm ci
cd ${{env.INDEXER_PATH}}
npm install
- name: Run Unit Tests
run: |
cd ${{env.INDEXER_PATH}}
npm run test:unit
- name: Start the local node
run: npx hedera start -d --verbose=trace
timeout-minutes: 5

- name: Run Acceptance Tests
run: |
cd ${{env.INDEXER_PATH}}
npm run test:acceptance
- name: Stop the local node
if: ${{ !cancelled() }}
run: npx hedera stop
5 changes: 5 additions & 0 deletions tools/erc-repository-indexer/erc-contract-indexer/local.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
HEDERA_NETWORK=local-node
MIRROR_NODE_URL=http://127.0.0.1:5551
MIRROR_NODE_URL_WEB3=http://127.0.0.1:8545
SDK_OPERATOR_ID=0.0.1022
SDK_OPERATOR_KEY=302e020100300506032b657004220420a608e2130a0a3cb34f86e757303c862bee353d9ab77ba4387ec084f881d420d4

0 comments on commit ca30825

Please sign in to comment.