Skip to content

Commit

Permalink
refactor: local deploy workflow -> test
Browse files Browse the repository at this point in the history
  • Loading branch information
0xClandestine committed Jan 30, 2025
1 parent f600f8c commit 2fe1bb6
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 38 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/deploy-local.yml

This file was deleted.

25 changes: 25 additions & 0 deletions src/test/unit/DeployFromScratch.t.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;

import {Test, console2} from "forge-std/Test.sol";
import {DeployFromScratch} from "script/deploy/local/Deploy_From_Scratch.s.sol";

// NOTE: Run the following command to deploy from scratch in an anvil instance:
// RUST_LOG=forge,foundry=trace forge script script/deploy/local/Deploy_From_Scratch.s.sol --slow \
// --rpc-url http://127.0.0.1:8545 \
// --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 \
// --broadcast \
// --sig "run(string memory configFile)" \
// -- local/deploy_from_scratch.anvil.config.json
contract DeployTest is Test {
DeployFromScratch public deployer;

function setUp() public {
deployer = new DeployFromScratch();
}

function test_DeployFromScratch() public {
// Deploy, expecting no revert.
deployer.run("local/deploy_from_scratch.anvil.config.json");
}
}

0 comments on commit 2fe1bb6

Please sign in to comment.