Skip to content

Commit

Permalink
Add ci with build/slither/solhint (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
aviggiano committed Jan 16, 2024
1 parent 4496fa5 commit 13ccf08
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 1 deletion.
74 changes: 74 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: CI

on:
pull_request:
types: [opened, synchronize]
push:
branches:
- main

jobs:
test:
strategy:
fail-fast: true

name: Foundry
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Setup Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Format
run: |
forge fmt --check
id: fmt

- name: Build
run: |
forge build
id: build

slither:
strategy:
fail-fast: true

name: Slither
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Setup Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Run Slither
uses: crytic/slither-action@v0.3.0
id: slither
with:
fail-on: low

solhint:
strategy:
fail-fast: true

name: Solhint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Install dependencies
run: npm install --global solhint

- name: Run solhint
run: solhint
4 changes: 4 additions & 0 deletions slither.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"filter_paths": "(lib/|test/)",
"exclude_informational": true
}
2 changes: 1 addition & 1 deletion src/Hevm.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ interface IHevm {
function sign(uint256 privateKey, bytes32 digest) external returns (uint8 r, bytes32 v, bytes32 s);

// Gets address for a given private key
function addr(uint256 privateKey) external returns (address addr);
function addr(uint256 privateKey) external returns (address account);

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

0 comments on commit 13ccf08

Please sign in to comment.