Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Test #158

Merged
merged 5 commits into from
Feb 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,12 @@ jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16, 18]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
node-version: 20.x
- name: Installing Packages
run: yarn install --frozen-lockfile
- name: Checking Formatting
Expand All @@ -30,6 +25,7 @@ jobs:
- name: Code Coverage
run: yarn coverage
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v2
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./lcov.info
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ cache
script
out
.vscode
yarn.lock
lcov.info
4 changes: 4 additions & 0 deletions .husky/_/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh

yarn prettier
yarn lint
4 changes: 4 additions & 0 deletions .husky/_/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh

yarn prettier-check
yarn test
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@
}
},
"dependencies": {
"yarn": "^1.22.10"
"yarn": "1.22.21"
},
"devDependencies": {
"coveralls": "3.1.1",
"husky": "9.0.10",
"prettier": "3.2.5",
"prettier-plugin-solidity": "1.3.1",
"sol2uml": "2.5.20",
Expand Down
4 changes: 2 additions & 2 deletions test/split.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
pragma solidity 0.8.23;

import "forge-std/Test.sol";
import "../src/Splitter.sol";
Expand Down Expand Up @@ -60,7 +60,7 @@ contract SplitterTest is Test {
}

function testSplitZeroAddress() public {
vm.expectRevert();
vm.expectRevert(bytes4(keccak256("ZeroAddressNotAllowed()")));
vm.prank(alice);
splitter.split{ value: amount }(address(0), address(0));
}
Expand Down
4 changes: 2 additions & 2 deletions test/withdraw.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
pragma solidity 0.8.23;

import "forge-std/Test.sol";
import "../src/Splitter.sol";
Expand Down Expand Up @@ -81,7 +81,7 @@ contract SplitterTest is Test {
}

function testWithdrawZero() public {
vm.expectRevert();
vm.expectRevert(bytes4(keccak256("ZeroAmountNotAllowed()")));
vm.prank(bob);
splitter.withdraw(0);
}
Expand Down
Loading
Loading