Skip to content

Commit 1354974

Browse files
committed
Include job to run Foundry script on local node
Signed-off-by: Luis Mastrangelo <luis@swirldslabs.com>
1 parent 4ec0d9e commit 1354974

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/test.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,52 @@ jobs:
348348
run: npm run test
349349
working-directory: examples/hardhat-hts
350350

351+
foundry-example-scripts:
352+
name: Foundry example scripts w/local node
353+
runs-on: smart-contracts-linux-medium
354+
steps:
355+
- name: Harden Runner
356+
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
357+
with:
358+
egress-policy: audit
359+
360+
- name: Checkout Code
361+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
362+
with:
363+
submodules: recursive
364+
365+
- name: Set up Node.js
366+
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
367+
with:
368+
node-version: 20
369+
370+
- name: Install Foundry
371+
uses: step-security/foundry-toolchain@01e2d127ea061e2ce8fa34340de71ca8518f093e # v1.2.1
372+
with:
373+
version: stable
374+
375+
- name: Run Forge build
376+
run: forge build
377+
378+
- name: Install Dependencies
379+
run: npm ci
380+
381+
- name: Start the local node
382+
run: npx hedera start --detach --verbose=trace
383+
timeout-minutes: 5
384+
385+
- name: Run Forge build on Foundry HTS example
386+
run: forge build
387+
working-directory: examples/foundry-hts
388+
389+
- name: Run Foundry script on local node
390+
run: forge script scripts/CreateToken.s.sol -vvv --rpc-url localnode --skip-simulation --broadcast
391+
working-directory: examples/foundry-hts
392+
393+
- name: Stop the local node
394+
if: ${{ !cancelled() }}
395+
run: npx hedera stop
396+
351397
e2e-test:
352398
name: 'NPM e2e validation tests'
353399
runs-on: smart-contracts-linux-medium

0 commit comments

Comments
 (0)