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

Add ci with build/slither/solhint #6

Merged
merged 1 commit into from
Jan 16, 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
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/[email protected]
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