Skip to content

Commit 13ccf08

Browse files
authored
Add ci with build/slither/solhint (#6)
1 parent 4496fa5 commit 13ccf08

File tree

3 files changed

+79
-1
lines changed

3 files changed

+79
-1
lines changed

.github/workflows/ci.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize]
6+
push:
7+
branches:
8+
- main
9+
10+
jobs:
11+
test:
12+
strategy:
13+
fail-fast: true
14+
15+
name: Foundry
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v3
19+
with:
20+
submodules: recursive
21+
22+
- name: Setup Foundry
23+
uses: foundry-rs/foundry-toolchain@v1
24+
with:
25+
version: nightly
26+
27+
- name: Format
28+
run: |
29+
forge fmt --check
30+
id: fmt
31+
32+
- name: Build
33+
run: |
34+
forge build
35+
id: build
36+
37+
slither:
38+
strategy:
39+
fail-fast: true
40+
41+
name: Slither
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/checkout@v3
45+
with:
46+
submodules: recursive
47+
48+
- name: Setup Foundry
49+
uses: foundry-rs/foundry-toolchain@v1
50+
with:
51+
version: nightly
52+
53+
- name: Run Slither
54+
uses: crytic/slither-action@v0.3.0
55+
id: slither
56+
with:
57+
fail-on: low
58+
59+
solhint:
60+
strategy:
61+
fail-fast: true
62+
63+
name: Solhint
64+
runs-on: ubuntu-latest
65+
steps:
66+
- uses: actions/checkout@v3
67+
with:
68+
submodules: recursive
69+
70+
- name: Install dependencies
71+
run: npm install --global solhint
72+
73+
- name: Run solhint
74+
run: solhint

slither.config.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"filter_paths": "(lib/|test/)",
3+
"exclude_informational": true
4+
}

src/Hevm.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ interface IHevm {
1818
function sign(uint256 privateKey, bytes32 digest) external returns (uint8 r, bytes32 v, bytes32 s);
1919

2020
// Gets address for a given private key
21-
function addr(uint256 privateKey) external returns (address addr);
21+
function addr(uint256 privateKey) external returns (address account);
2222

2323
// Performs a foreign function call via terminal
2424
function ffi(string[] calldata inputs) external returns (bytes memory result);

0 commit comments

Comments
 (0)