Commit 663f40f6 authored by Mark Tyneway's avatar Mark Tyneway

contracts-periphery: run foundry tests in CI

The `yarn:coverage` command is ran in CI so add
`forge coverage` to that command so the foundry tests
also run.
parent 6e5fda97
...@@ -50,7 +50,7 @@ contract TransactorTest is Transactor_Initializer { ...@@ -50,7 +50,7 @@ contract TransactorTest is Transactor_Initializer {
// Run CALL // Run CALL
vm.prank(alice); vm.prank(alice);
vm.expectCall(address(callRecorded), data); vm.expectCall(address(callRecorded), data);
transactor.CALL(address(callRecorded), data, 200_000 wei, 420); transactor.CALL(address(callRecorded), data, 200_000 wei);
} }
// It should revert if called by non-owner // It should revert if called by non-owner
...@@ -59,7 +59,7 @@ contract TransactorTest is Transactor_Initializer { ...@@ -59,7 +59,7 @@ contract TransactorTest is Transactor_Initializer {
bytes memory data = abi.encodeWithSelector(callRecorded.record.selector); bytes memory data = abi.encodeWithSelector(callRecorded.record.selector);
// Run CALL // Run CALL
vm.prank(bob); vm.prank(bob);
transactor.CALL(address(callRecorded), data, 200_000 wei, 420); transactor.CALL(address(callRecorded), data, 200_000 wei);
vm.expectRevert("UNAUTHORIZED"); vm.expectRevert("UNAUTHORIZED");
} }
...@@ -69,7 +69,7 @@ contract TransactorTest is Transactor_Initializer { ...@@ -69,7 +69,7 @@ contract TransactorTest is Transactor_Initializer {
// Run CALL // Run CALL
vm.prank(alice); vm.prank(alice);
vm.expectCall(address(reverter), data); vm.expectCall(address(reverter), data);
transactor.DELEGATECALL(address(reverter), data, 200_000 wei); transactor.DELEGATECALL(address(reverter), data);
} }
// It should revert if called by non-owner // It should revert if called by non-owner
...@@ -78,7 +78,7 @@ contract TransactorTest is Transactor_Initializer { ...@@ -78,7 +78,7 @@ contract TransactorTest is Transactor_Initializer {
bytes memory data = abi.encodeWithSelector(reverter.doRevert.selector); bytes memory data = abi.encodeWithSelector(reverter.doRevert.selector);
// Run CALL // Run CALL
vm.prank(bob); vm.prank(bob);
transactor.DELEGATECALL(address(reverter), data, 200_000 wei); transactor.DELEGATECALL(address(reverter), data);
vm.expectRevert("UNAUTHORIZED"); vm.expectRevert("UNAUTHORIZED");
} }
} }
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
"test": "yarn test:contracts", "test": "yarn test:contracts",
"test:contracts": "hardhat test --show-stack-traces", "test:contracts": "hardhat test --show-stack-traces",
"test:forge": "forge test", "test:forge": "forge test",
"test:coverage": "NODE_OPTIONS=--max_old_space_size=8192 hardhat coverage", "test:coverage": "NODE_OPTIONS=--max_old_space_size=8192 hardhat coverage && yarn test:coverage:forge",
"test:coverage:forge": "forge coverage", "test:coverage:forge": "forge coverage",
"test:slither": "slither .", "test:slither": "slither .",
"gas-snapshot": "forge snapshot", "gas-snapshot": "forge snapshot",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment