Skip to content

Commit

Permalink
update workflow scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
gretzke committed Aug 16, 2024
1 parent b67e7ec commit 0a729b7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-python@v5
with:
submodules: recursive
- name: Install Foundry
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
name: Foundry project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive

Expand Down
6 changes: 4 additions & 2 deletions script/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ import {Counter} from 'src/Counter.sol';
contract Deploy is Script {
using stdJson for string;

function run() public returns (Counter) {
function run() public returns (Counter counter) {
vm.startBroadcast(vm.envUint('PRIVATE_KEY'));
uint256 initialNumber = 5;
return new Counter(initialNumber);
counter = new Counter(initialNumber);
vm.stopBroadcast();
}
}
1 change: 1 addition & 0 deletions test/Counter.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ contract DeploymentTest is Test {
Counter counter;

function setUp() public virtual {
vm.setEnv('PRIVATE_KEY', vm.toString(makeAccount('DEPLOYER').key));
counter = new Deploy().run();
}

Expand Down

0 comments on commit 0a729b7

Please sign in to comment.